open System let judgeEto inseq = let maxNum = int (ceil (float (Seq.length inseq) / 2.)) inseq |> Seq.groupBy id |> Seq.map (fun (key, gseq) -> Seq.length gseq) |> Seq.max |> (fun nmax -> nmax <= maxNum) let N = Console.ReadLine () |> int [1..N] |> List.map (fun _ -> Console.ReadLine ()) |> Seq.ofList |> judgeEto |> (fun result -> if result then "YES" else "NO") |> printf "%A"