def is_ok(x): # 条件を満たすかどうか?問題ごとに定義 count = 0 now = B[0] r = 0 for i in range(1,len(B)): while True: r += 1 if now > B[i]: return False if now+x == B[i]: now = B[i] break else: count += 1 now += x if count > M: return False return True def meguru_bisect(ng, ok): ''' 初期値のng,okを受け取り,is_okを満たす最小(最大)のokを返す まずis_okを定義すべし ng ok は とり得る最小の値-1 とり得る最大の値+1 最大最小が逆の場合はよしなにひっくり返す ''' while (abs(ok - ng) > 1): mid = (ok + ng) // 2 if is_ok(mid): print('Yes') exit() else: if mid == 0: print('No') exit() ok = mid return ok N = int(input()) A = list(map(int,input().split())) M = A.count(0) A.sort() B = A[M:] ans = meguru_bisect(-1,10**18)