package main import ( "fmt" "reflect" ) func Sum(a []int) int { ret := 0 for i := 0; i < len(a); i++ { ret += a[i] } return ret } func resolve(N int, A []int) string { total := 0 B := make([]int, N) C := make([]int, N) for _, a := range []int{2, 4} { t := A[0] + a for i := 0; i < N; i++ { B[i] = t - A[i] } for i := 0; i < N; i++ { C[i] = Sum(B[:i]) + Sum(B[i+1:]) } if reflect.DeepEqual(A, C) == false { continue } total = t break } if total == 0 { return "???" } turu := 0 kame := 0 for i := 0; i < N; i++ { switch total - A[i] { case 2: turu += 1 case 4: kame += 1 } } return fmt.Sprintf("%d %d", turu, kame) } func main() { var N int fmt.Scanf("%d\n", &N) A := make([]int, N) for i := 0; i < N; i++ { fmt.Scanf("%d", &A[i]) } fmt.Scanf("\n") fmt.Println(resolve(N, A)) }