There are N cats. We number them from 1 through N.

Each of the cats wears a hat. Cat i says: "there are exactly a_i different colors among the N - 1 hats worn by the cats except me."

Determine whether there exists a sequence of colors of the hats that is consistent with the remarks of the cats.

Constraints

* 2 ≤ N ≤ 10^5
* 1 ≤ a_i ≤ N-1

Input

Input is given from Standard Input in the following format:


N
a_1 a_2 ... a_N


Output

Print `Yes` if there exists a sequence of colors of the hats that is consistent with the remarks of the cats; print `No` otherwise.

Examples

Input

3
1 2 2


Output

Yes


Input

3
1 1 2


Output

No


Input

5
4 3 4 3 4


Output

No


Input

3
2 2 2


Output

Yes


Input

4
2 2 2 2


Output

Yes


Input

5
3 3 3 3 3


Output

No
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {


    public void solve() throws IOException {
        int n = nextInt();
        int a[] = new int[n];
        int max = 0, min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
            max = Math.max(max, a[i]);
            min = Math.min(min, a[i]);
        }
        if(max - min > 1) {
            out.print("No");
            return;
        }else if(max - min == 0){
            if(max <= n / 2 || max == n - 1) out.print("Yes");
            else out.print("No");
            return;
        }else{
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                if(a[i] == min) cnt++;
            }
            if(cnt > min){
                out.print("No");
                return;
            }else{
                if(cnt + (max - cnt) * 2 > n){
                    out.print("No");
                }else out.print("Yes");
            }
        }
    }


    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Main().run();
    }

    void run() throws IOException {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
//            br = new BufferedReader(new FileReader("queue.in"));
//            out = new PrintWriter(new File("queue.out"));
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens()) {
            try {
                sc = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
}