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 x = scanner.nextInt();
		int max,min;
		if(x % 2 ==0) {
			if(x % 4 ==0) {
				min = x/4;
			}else {
				min = 0;
			}
			max = x /2 ;
			System.out.println(min+" "+max);
		}else {
			System.out.println(0+" "+0);
		}
	}		
}

	

Double click to view unformatted code.


Back to problem 87