using System; using System.Collections.Generic; using System.Linq; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); Dictionary etos = new Dictionary(); for (int i = 0; i < n; i++) { string add = Console.ReadLine(); if (etos.Keys.Contains(add)) ++etos[add]; else etos.Add(add, 1); } int max = etos.Max(x => x.Value); Console.WriteLine((n + 1) / 2 < max ? "NO" : "YES"); } }