n = io.read("*n")
local t = {}
for i = 1, n do
  t[i] = io.read("*n")
end
table.sort(t)
local function solve()
  if t[1] + 1 < t[n] then
    return false
  end
  if t[1] == t[n] then
    if t[n] == n - 1 then return true end
  end
  local major = 0
  for i = 1, n do
    if t[i] == t[n] then
      major = n + 1 - i
      break
    end
  end
  local minor = n - major
  local minhats = minor + 1
  local maxhats = minor + major // 2
  return minhats <= t[n] and t[n] <= maxhats
end

print(solve() and "Yes" or "No")
