package main import ( "fmt" ) func main() { var N int fmt.Scan(&N) a := make([]int, N) var b int var f int var turu, turu_c int for i := range a { fmt.Scan(&a[i]) if i > 0 { if a[i] > b { turu_c = a[i] } else { turu_c = b } f = 1 } b = a[i] } if f == 0 { if b / (N-1) == 2 { turu = N } } else { for i := range a { if a[i] == turu_c { turu += 1 } } } fmt.Println(turu, N-turu) }