using System;
using System.Linq;
using CompLib.Collections;
using CompLib.Util;

public class Program
{
    private int N;
    private int[] S;

    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();
        S = sc.IntArray();

        var map = new HashMap<int, int>();
        foreach (int i in S)
        {
            map[i]++;
        }

        var ar = map.ToArray();
        Array.Sort(ar, (l, r) => r.Key.CompareTo(l.Key));

        var size = new int[N + 1];
        size[N] = 1;

        foreach (var pair in ar)
        {
            int tmp = pair.Value;
            var next = new int[N + 1];
            for (int i = N; i >= 0 && tmp > 0; i--)
            {
                int min = Math.Min(tmp, size[i]);
                size[i] -= min;
                tmp -= min;
                for (int j = i - 1; j >= 0; j--)
                {
                    next[j] += min;
                }
            }

            if (tmp != 0)
            {
                Console.WriteLine("No");
                return;
            }

            for (int i = 0; i <= N; i++)
            {
                size[i] += next[i];
            }
        }

        Console.WriteLine("Yes");
    }

    public static void Main(string[] args) => new Program().Solve();
}

namespace CompLib.Collections
{
    using System.Collections.Generic;

    public class HashMap<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get
            {
                TValue o;
                return TryGetValue(key, out o) ? o : default(TValue);
            }
            set { base[key] = value; }
        }
    }
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            if (_index >= _line.Length)
            {
                string s;
                do
                {
                    s = Console.ReadLine();
                } while (s.Length == 0);

                _line = s.Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            string s = Console.ReadLine();
            _line = s.Length == 0 ? new string[0] : s.Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Measured memory_bytes: 74392