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 [for _ in 1..N -> Console.ReadLine ()] |> Seq.ofList |> judgeEto |> (function true -> "YES" | false -> "NO") |> printfn "%s"