import java.util.*; import static java.lang.System.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); Map map = new LinkedHashMap<>(); String s; for (int i=0; i entry : map.entrySet()) { max = Math.max(max,entry.getValue()); } if (max < (n+1)/2) {out.println("YES");} else {out.println("NO");} } }