import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); //ここから処理開始 int n = sc.nextInt(); int A[] = new int[n]; for (int i = 0; i < n; i++) { A[i] = sc.nextInt() / 2; } int tru = 0; int kame = 0; int sum = 0; for(int i = 0; i < n; i++) { sum += A[i]; } sum = sum / (n - 1); for(int i = 0; i <= n; i++) { for(int j = 0; j <= n; j++) { if(sum == i * 1 + j * 2) { if(i + j == n) { System.out.print(i); System.out.print(' '); System.out.println(j); break; } } } } //ここまで sc.close(); } }