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 seq { for _ in 1..N -> Console.ReadLine ()} |> Seq.toList |> Seq.ofList |> judgeEto |> (fun result -> if result then "YES" else "NO") |> printfn "%s"