View Code of Problem 87


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int a=scanner.nextInt();
		int min=a/4;
		int max=a/2;
		int b=a;
		int i=0;
		
		if (a%4!=0) {
			min=min+1;
		}
		if (a%2!=0) {
			min=0;
			max=0;
		}
		System.out.println(min+" "+max);
	}
}

Double click to view unformatted code.


Back to problem 87