Harryxun/stf_run huggingface dataset:
import heapq
n=int(input())
Ans=[]
A=[int(i) for i in input().split()]
A.sort()
if A[0]>=0:
  Ans=[]
  heapq.heapify(A)
  for i in range(n-2):
    a1=heapq.heappop(A)
    a2=heapq.heappop(A)
    Ans.append([a1,a2])
    heapq.heappush(A,a1-a2)
  a1=heapq.heappop(A)
  a2=heapq.heappop(A)
  Ans.append([a2,a1])
  print(a2-a1)
  for i in range(n-1):
    print(*Ans[i])

elif A[-1]<=0:
  Ans=[]
  AA=[]
  for i in range(n):
    AA.append(-A[i])
  heapq.heapify(AA)
  for i in range(n-2):
    a1=heapq.heappop(AA)
    a2=heapq.heappop(AA)
    Ans.append([-a1,-a2])
    heapq.heappush(A,-(a2-a1))
  a1=heapq.heappop(A)
  a2=heapq.heappop(A)
  Ans.append([a2,-a1])
  print(a2+a1)
  for i in range(n-1):
    print(*Ans[i])
else:    
  Ap,Az,Am=[],[],[]
  for i in range(n):
    if A[i]>0:
      Ap.append(A[i])
    elif A[i]==0:
      Az.append(A[i])
    else:
      Am.append(-A[i])
  Ap.sort()
  Am.sort()
  pp,mm=Ap.pop(),Am.pop()
  heapq.heapify(Ap)
  heapq.heapify(Am)

  while len(Am)>=1:
    am=heapq.heappop(Am)
    Ans.append([pp,-am])
    pp+=am
  while len(Ap)>=1:
    ap=heapq.heappop(Ap)
    Ans.append([-mm,ap])
    mm+=ap
  for i in range(len(Az)):
    Ans.append([pp,0])
  Ans.append([pp,-mm])
  print(pp+mm)
  for i in range(len(Ans)):
    print(*Ans[i])

### FIXED CODE ###

import heapq
n=int(input())
Ans=[]
A=[int(i) for i in input().split()]
A.sort()
if A[0]>=0:
  Ans=[]
  heapq.heapify(A)
  for i in range(n-2):
    a1=heapq.heappop(A)
    a2=heapq.heappop(A)
    Ans.append([a1,a2])
    heapq.heappush(A,a1-a2)
  a1=heapq.heappop(A)
  a2=heapq.heappop(A)
  Ans.append([a2,a1])
  print(a2-a1)
  for i in range(n-1):
    print(*Ans[i])

elif A[-1]<=0:
  Ans=[]
  AA=[]
  for i in range(n):
    AA.append(-A[i])
  heapq.heapify(AA)
  for i in range(n-2):
    a1=heapq.heappop(AA)
    a2=heapq.heappop(AA)
    Ans.append([-a1,-a2])
    heapq.heappush(AA,-(a2-a1))
  a1=heapq.heappop(AA)
  a2=heapq.heappop(AA)
  Ans.append([max(-a2,-a1),min(-a2,-a1)])
  print(max(-a2,-a1)-min(-a2,-a1))
  for i in range(n-1):
    print(*Ans[i])
else:    
  Ap,Az,Am=[],[],[]
  for i in range(n):
    if A[i]>0:
      Ap.append(A[i])
    elif A[i]==0:
      Az.append(A[i])
    else:
      Am.append(-A[i])
  Ap.sort()
  Am.sort()
  pp,mm=Ap.pop(),Am.pop()
  heapq.heapify(Ap)
  heapq.heapify(Am)

  while len(Am)>=1:
    am=heapq.heappop(Am)
    Ans.append([pp,-am])
    pp+=am
  while len(Ap)>=1:
    ap=heapq.heappop(Ap)
    Ans.append([-mm,ap])
    mm+=ap
  for i in range(len(Az)):
    Ans.append([pp,0])
  Ans.append([pp,-mm])
  print(pp+mm)
  for i in range(len(Ans)):
    print(*Ans[i])
s=input()
s_list=list(s)

x=len(s_list)

a_list=reversed(s_list)
if a_list[0]=="s":
  s_list[x]="e"
  s_list[x+1]="s"
else:
  s_list[x+1]="s"

print(s_list)

### FIXED CODE ###

s=input()
s_list=list(s)
 
x=len(s_list)

if s_list[x-1]=="s":
  s_list.append("es")
else:
  s_list.append("s")

print("".join(s_list))
n=int(input())
s=input()

rcount=s.count("R")
num=s[0:rcount]
rnum=num.count("R")



print(rcount-rnum)

### FIXED CODE ###

n=int(input())

print('Yes' if n>=30 else "No")
n = int(input())
temp = 0
ans = 0
for i in range(n):
    a,b = map(int,input().split(' '))
    if a > temp:
        ans = a + b
print ans

### FIXED CODE ###


n = int(input())
temp = 0
ans = 0
for i in range(n):
    a,b = map(int,input().split(' '))
    if a > temp:
        ans = a + b
        temp = a
print(ans)
import re
while True:
    try:
       f = input().split()
    except:
        break
    stack = []
    for c in f:
        if re.match("-*[0-9]", c) is None:
            b, a = stack.pop(), stack.pop()
            stack.append(eval("{}{}{}".format(a, c, b)))
        else:
            stack.append(c)
    print("{0:.6f}".format(stack[0]))

### FIXED CODE ###

import re
while True:
    try:
       f = input().split()
    except:
        break
    stack = []
    for c in f:
        if re.match("-*[0-9]", c) is None:
            b, a = str(stack.pop()), str(stack.pop())
            stack.append(float(eval(a+c+b)))
        else:
            stack.append(c)
    print(stack[0])
import numpy as np
import math
n = int(input())
A = np.fromstring(input(),dtype=np.int64,sep=" ")
rng = int(math.log2(np.max(A)))+1
sum = 0
d = 10**9+7
for bit in range(64):
    c = int((A & 1).sum())
    sum += c *(n-c)*(1<<bit)%d
    A = A>>1

print(sum %(d))

### FIXED CODE ###

import numpy as np
 
 
def solve(string):
    n, *a = map(int, string.split())
    # a = ["{:060b}".format(_a) for _a in a]
    a = np.asarray(a, dtype=np.int64)
    m = 10**9 + 7
    ans = 0
    for i in range(60):
        s = int((a & 1).sum())
        a >>= 1
        # ans += s * (n - s) * pow(2, 59 - i, m)
        ans += s * (n - s) * pow(2, i, m) % m
        ans %= m
    return str(ans)
 
 
if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))
import sys
f=lambda:map(int,sys.stdin.readline().split())
n,q=f()
g=[[] for _ in range(n)]
for i in range(n-1):
  a,b=f()
  g[a-1]+=[b-1]
  g[b-1]+=[a-1]
c=[0]*n
for i in range(q):
  v,x=f()
  c[v-1]+=x
def dfs(v,p=-1):
  for i in g[v]:
    if i==p: continue
    c[i]+=c[v]
    dfs(i,v)
dfs(0)
print(*c)

### FIXED CODE ###

import sys
f=lambda:map(int,sys.stdin.readline().split())
n,q=f()
g=[[] for _ in range(n)]
for i in range(n-1):
  a,b=f()
  g[a-1]+=[b-1]
  g[b-1]+=[a-1]
c=[0]*n
for i in range(q):
  v,x=f()
  c[v-1]+=x
b=[0]+[1]*(n-1)
s=[0]
while s:
  t=s.pop()
  for i in g[t]:
    if b[i]:
      c[i]+=c[t]
      s+=[i]
      b[i]=0
print(*c)
import bisect

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
F = list(map(int, input().split()))
A.sort()
F.sort(reverse=True)
if sum(A) <= K:
    print(0)
else:
    left = 0
    right = max([A[i]*F[i] for i in range(N)])
    while left + 1 != right:
        mid = int((left + right) / 2)
        train_n = sum([A[i]-mid//F[i] for i in range(N)])
        if train_n > K:
            left = mid
        else:
            right = mid
    print(right)


### FIXED CODE ###

A, B = list(map(int, input().split()))
if A > 9 or B > 9:
    print(-1)
else:
    print(A*B)
ut())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
    if a % k == 0:
        print("OK")
        ngflag = False
        break
    a += 1
if ngflag:
    print("NG")


### FIXED CODE ###

k = int(input())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
    if a % k == 0:
        print("OK")
        ngflag = False
        break
    a += 1
if ngflag:
    print("NG")
from decimal import *
n=input()
ans=eval("Decimal("+input().replace(" ",")*Decimal(")+")")

if ans>10**18:
  print(-1)
else:
  print(int(ans))

### FIXED CODE ###

n=input()
A=list(map(int,input().split()))
ans=1
if A.count(0)==0:
  for i in A:
    ans*=i
    if ans>10**18:
      ans=-1
      break
else:
  ans=0
print(ans)
n = int(input())
words = []

for i in range(n):
  word = input()
  if i >= 1:
    if word in words or word[1] != before_word[-1]:
      print('No')
      break
  before_word = word
  words.append(word)

else:
  print('Yes')

### FIXED CODE ###

n = int(input())
words = []
 
for i in range(n):
  word = input()
  if i >= 1:
    if word in words or word[0] != words[-1][-1]:
      print('No')
      break
      
  words.append(word)

else:
  print('Yes')
def main():
  N, K = map(int, input().split())
  
  H = sorted(list(map(int, input().split())), reverse=True)
 
  n =  sum(H)
  
  if K == 0:
    print(n)
  else:
    for i in range(K):
      n -= H[i]
    print(n)
    
  return 0

if __name__ == "__main__":
  main()

### FIXED CODE ###

def main():
  N, K = map(int, input().split())
  
  H = sorted(list(map(int, input().split())), reverse=True)
 
  n = sum(H)
  
  if K == 0:
    print(n)
  elif N > K:
    for i in range(K):
      n -= H[i]
    print(n)
  else:
    print(0)
    
  return 0
 
if __name__ == "__main__":
  main()
n, k = map(int, input().split())
v = list(map(int, input().split()))
ans = 0 
# left
for i in range(min(n, k) + 1):
    # right
    for j in range(min(n, k) - i + 1):
        par_seq = sorted(v[:i] + v[-j:] if j != 0 else v[:i])
        par_seq_sum = sum(par_seq)
        if par_seq_sum > ans:
            ans = par_seq_sum
        m = k - (i + j)
        tmp = max([sum(par_seq[i:]) for i in range(min(m, len(par_seq)))])
        if tmp > ans:
          ans = tmp
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
v = list(map(int, input().split()))
ans = 0 
# left
for i in range(min(n, k) + 1):
    # right
    for j in range(min(n, k) - i + 1):
        # print(i,j)
        par_seq = sorted(v[:i] + v[-j:] if j != 0 else v[:i])
        par_seq_sum = sum(par_seq)
        if par_seq_sum > ans:
            ans = par_seq_sum
        ope = k - (i + j)
        # print(par_seq, par_seq_sum)
        for _ in range(min(ope, len(par_seq))):
            rm = par_seq.pop(0)
            if rm < 0 and sum(par_seq) > ans:
                ans = sum(par_seq)

print(ans)
h, w = map(int, input().split())

field = [list(input()) for _ in range(h)]

dp = [[None] * w for _ in range(h)]
def dfs(hindex=h - 1, windex=w - 1):
    if field[hindex][windex] == "#":
        return 0
    if hindex == windex == 0:
        return 1

    if dp[hindex][windex] is not None:
        return dp[hindex][windex]
    r = (hindex and dfs(hindex - 1, windex)) + (windex and dfs(hindex, windex - 1))
    dp[hindex][windex] = r
    return r

print(dfs() % (10**9 + 7))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
h, w = map(int, input().split())

field = [list(input()) for _ in range(h)]

dp = [[None] * w for _ in range(h)]
def dfs(hindex=h - 1, windex=w - 1):
    if field[hindex][windex] == "#":
        return 0
    if hindex == windex == 0:
        return 1

    if dp[hindex][windex] is not None:
        return dp[hindex][windex]
    r = (hindex and dfs(hindex - 1, windex)) + (windex and dfs(hindex, windex - 1))
    dp[hindex][windex] = r
    return r

print(dfs() % (10**9 + 7))
N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))
pos.sort()
neg.sort()

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0])
else:
	print(sum(pos) + sum(neg[:-1]))



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))
pos.sort()
neg.sort()

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif len(pos) > 0 and abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0])
else:
	print(sum(abs_list[1:])-abs_list[0])
A, B = input().split()
A = int(A)
B = float(B)
B_ = round(B*100)
C = A*B_
C_ = str(C)
if C < 100:
    print(0)
else:
    print(C[:-2])

### FIXED CODE ###

#A,B = 664706138336385, 9.79
A, B = input().split()
A = int(A)
B = float(B)
B_ = round(B*100)
C = A*B_
C_ = str(C)
if C < 100:
    print(0)
else:
    print(C_[:-2])
def culc(a, sum, plus, ans):
    for i in range(1, n):
        plus = not(plus)
        sum += a[i]
        if plus:
            if sum <= 0:
                ans += abs(sum) + 1
                sum = 1
        else:
            if sum >= 0:
                ans += abs(sum) + 1
                sum = -1
    return ans

n = int(input())
a = list(map(int, input().split()))

plus = None
if a[0] > 0:
    plus = True
else:
    plus = False

ans1 = culc(a, a[0], plus, 0)

a[0] = a[0] // abs(a[0]) * -1

ans2 = abs(a[0]) + 1
ans2 = culc(a, a[0], not(plus), abs(a[0]) + 1)

print(min(ans1, ans2))

### FIXED CODE ###


def culc(a, plus):
    sum = 0
    ans = 0
    for i in range(len(a)):
        sum += a[i]
        if plus:
            if sum <= 0:
                ans += abs(sum) + 1
                sum = 1
        else:
            if sum >= 0:
                ans += abs(sum) + 1
                sum = -1
        plus = not(plus)
    return ans

n = int(input())
a = list(map(int, input().split()))

plus = None
if a[0] >= 0:
    plus = True
else:
    plus = False

ans1 = culc(a, plus)
ans2 = culc(a, not(plus))

print(min(ans1, ans2))
import sys
a=1
for b in sys.stdin:b=b.strip()
    if b=="0":break
    print(f'Case {a}: {b}')
    a+=1

### FIXED CODE ###

x=int(input())
i=1
while x!=0:
    print("Case %d: %s" %(i,x))
    x=int(input())
    i+=1
while true:
H,W = map(int,raw_input().split())

 if:W==0 and H==0 :
    break
 
 else:
 print ('#' * W + '\n')

 print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
 print ('#'*W + '\n')

### FIXED CODE ###

while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')
from fractions import gcd
from bisect import bisect_right
n,k=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
if k>A[n-1]:ans=-1
else:
    a=A[0]
    for i in range(1,n):
        a=gcd(a,A[i])
    m=A[bisect_right(A,k)]
    if (m-k)%a==0:
        ans=1
    else:
        ans=-1
if ans==1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

from fractions import gcd
from bisect import bisect_right
n,k=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
if k>A[n-1]:ans=-1
elif k==A[n-1]:ans=1
else:
    a=A[0]
    for i in range(1,n):
        a=gcd(a,A[i])
    m=A[bisect_right(A,k)]
    if (m-k)%a==0:
        ans=1
    else:
        ans=-1
if ans==1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
A, B = map(int, input().split())

def GCD(a,b):
    if a < b:
        a, b = b, a
    if a % b == 0:
        return b
    else:
        return GCD(b, a % b)

def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

g = GCD(A,B)
P = primes(g)
Q = []
for p in P:
    if g % p == 0:
        Q.append(p)

n = len(Q)
print(n + 1)


### FIXED CODE ###

from math import sqrt

A,B = map(int,input().split())

def gcd(a,b):
    if a < b:
        a,b = b,a
    while a % b != 0:
        r = a % b
        a,b = b,r
    return b

def count_prime(n):
    #nを割り切る素数の個数
    if n == 1:
        return 0
    n_is_prime = True
    P = []
    for i in range(2,int(sqrt(n))+1):
        if n % i == 0:
            n_is_prime = False
            P.append(i)
            while n % i == 0:
                n //= i
    if n_is_prime:
        return 1
    elif n == 1:
        return len(P)
    else:
        #この時点で割り切れずに残ったnは未発見の素数
        return len(P)+1

g = gcd(A,B)
c_p = count_prime(g)
print(c_p+1)
from collections import Counter

def main():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = 0
    l1 = []
    for ea in a:
        l1.append(cnt - ea)
        cnt += 1
    l1c = Counter(l1)
    r = 0
    for ea2 in a:
        r += l1c[ea2 + a[ea2]]
    print(int(r))

if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import Counter

def main():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = 0
    l1 = []
    for ea in a:
        l1.append(cnt - ea)
        cnt += 1
    l1c = Counter(l1)
    r = 0
    for i2 in range(n):
        r += l1c[i2 + a[i2]]
    print(int(r))

if __name__ == '__main__':
    main()
n = int(input()
table = list(map(int, input().split()))

print(min(table), max(table), sum(table))





### FIXED CODE ###

n = int(input())
data = list(map(int, input().split()))

print(min(data), max(data), sum(data))
a = int(input())

b = int(input())

ans = int(0)

for i in range(1,21):
    if b > a*i-i+1:
            ans += 1
    else:
            ans += 1
            print(ans)
            break

### FIXED CODE ###

a, b = map(int,input().split())

ans = int(1)

for i in range(20):
    ans += a-1
    if ans < b:
        continue
    elif i == 0 and 1 == b:
        print(0)
        break
    else:
        print(i+1)
        break
import sys, math, collections, heapq, itertools
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()

def solve():
    N, Q = map(int, line_input())
    event = []
    for i in range(N):
        s, t, x = map(int, line_input())
        event.append((max(s-x, 0), 1, x, i))
        event.append((max(t-x, 0), -1, x, i))
    for i in range(Q):
        d = int(single_input())
        event.append((d, 2, 0, 0))
    event.sort()
    stop = []
    heapq.heapify(stop)
    ans = ""
    for time, parameter, co, ci in event:
        if parameter == 1: heapq.heappush(stop, (co, i))
        elif parameter == -1: stop.remove((co, i))
        else:
            if stop: ans += str(stop[0][0]) + "\n"
            else: ans += "-1\n"
    print(ans)

    return 0

if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys, collections, heapq
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()

def solve():
    N, Q = map(int, line_input())
    event = []
    for i in range(N):
        s, t, x = map(int, line_input())
        event.append((s-x, 1, x))
        event.append((t-x,-1, x))
    for i in range(Q):
        d = int(single_input())
        event.append((d, 2, d))
    event.sort()
    candidate = []
    heapq.heapify(candidate)
    stop = collections.defaultdict(int)
    ans = ""
    for time, parameter, co in event:
        if parameter == 1:
            heapq.heappush(candidate, co)
            stop[co] += 1
        elif parameter == -1:
            stop[co] -= 1
        else:
            while candidate:
                x = heapq.heappop(candidate)
                if stop[x] > 0:
                    heapq.heappush(candidate, x)
                    ans += str(x) + "\n"
                    break
            else: ans += "-1\n"
    print(ans)

    return 0

if __name__ == "__main__":
    solve()
a, b, c = input().split()
if a == b:
    print(C)
elif a == c:
    print(b)
else:
    print(a)


### FIXED CODE ###

a, b, c = map(int,input().split())
if a == b:
    print(c)
elif a == c:
    print(b)
else:
    print(a)
N, X = map(int,input().split())
L = list(map(int,input().split()))
count = 1
now = 0
for i in range(N+1):
    if now+L[i]>X:
        break
    else:
        now += L[i]
        count += 1
print(count)

### FIXED CODE ###

N, X = map(int,input().split())
L = list(map(int,input().split()))
count = 1
now = 0
for i in range(N):
    if now+L[i]>X:
        break
    else:
        now += L[i]
        count += 1
print(count)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
happiness = 0

for i in range(0, N, i++):
  if(A[N-1]==A[N]-1):
    happiness += (B[A[N]]+C[N-1])
  else:
    happiness += B[A[N]]
print(happiness)

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
happiness = 0

for i in range(0, N, 1):
  if i > 0:
    if A[i-1] == (A[i]-1):
      happiness += (B[A[i]-1]+C[A[i]-2])
    else:
      happiness += B[A[i]-1]
  else:
    happiness += B[A[i]-1]
print(happiness)
n=int(input())
can=n*800
p=n
des=200
if n>=15 and n<30:
  total=can-200
elif n>=30 and n<45:
  total=can-400
elif n>=45 and n<60:
  total=can-600
elif n>=60 and n<75:
  total=can-800
elif n>=75 and n<90:
  total=can-1000
elif n>=90 and n<=100:
  total=can-1200
print(total)
  

### FIXED CODE ###

n = int(input())

x = 800*n

y = (n // 15) * 200

print(x-y)
import sys
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(100000)


def read_values():
    return map(int, input().split())


def read_index():
    return map(lambda x: x - 1, map(int, input().split()))


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def functional(N, mod):
    F = [1] * (N + 1)
    for i in range(N):
        F[i + 1] = (i + 1) * F[i] % mod
    return F


def main():
    a, b, c = read_values()
    print("Yes" if c - a - b> 2 * (a * b) ** 0.5) else "No")


if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(100000)


def read_values():
    return map(int, input().split())


def read_index():
    return map(lambda x: x - 1, map(int, input().split()))


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def functional(N, mod):
    F = [1] * (N + 1)
    for i in range(N):
        F[i + 1] = (i + 1) * F[i] % mod
    return F


def main():
    a, b, c = read_values()
    r = c - a - b
    if r <= 0:
        print("No")
        return
    
    print("Yes" if (c - a - b) ** 2 > 4 * a * b else "No")

if __name__ == "__main__":
    main()
N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

def sunuke(ai, bi, ci, ans):

    if ai > N-1:
        print(ans)
    elif bi > N-1:
        sunuke(ai+1, 0, 0, ans)
    elif ci > N-1:
        sunuke(ai, bi+1, 0, ans)

    elif A[ai] >= B[bi]:
        sunuke(ai,bi+1,ci, ans)
    elif B[bi] >= C[ci]:
        sunuke(ai, bi, ci+1, ans)
    else:
        sunuke(ai, bi, ci+1, ans+1)

ans = 0
sunuke(0,0,0, ans)


### FIXED CODE ###

import bisect

N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

A.sort()
C.sort()
#ある一つのBについて、それ以下のAの個数とそれ以上のCの個数を二分探索で求める
ans = 0
for i in range(N):
    lw_a = bisect.bisect_left(A, B[i])
    up_c = N - bisect.bisect_right(C, B[i])
    ans += lw_a * up_c
print(ans)
def checker(x):
    if x < 2 or x%2==0:
        return False
    for i in range(2,x**0.5+1):
        if x % i ==0:
            return False
    return True

cnt=0
q=int(input())
for _ in range(q):
    v=int(input())
    if checker(v):
        cnt += 1
print(cnt)

### FIXED CODE ###

def checker(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0 :
        return False
    for i in range(2,int(x**0.5)+1):
        if x % i == 0 :
            return False
    return True

cnt=0
q=int(input())
for _ in range(q):
    v=int(input())
    if checker(v):
        cnt += 1
print(cnt)
#! cat input | python3 main.py

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
ma = max(a)

def f(a, k, ma):
    minv = float("inf")
    for i, v in enumerate(a[1:]):
        minv = min(minv, v - a[i])

    if minv == 1:
        return False

    a = a[:]
    for i in range(0, ma, minv):
        if i < a[0]:
            continue
        if i == a[0]:
            del a[0]
        else:
            return False
    return True

if ma < k:
    print("IMPOSSIBLE")
elif f(a, k, ma):
    print("IMPOSSIBLE")
else:
    print("POSSIBLE")


### FIXED CODE ###

a, b = map(int, input().split())
array = list(map(int, input().split()))
impossible = "IMPOSSIBLE"
possible = "POSSIBLE"

array = list(set(array))

if len(array) == 1:
    if b == array[0]:
        print(possible)
    else:
        print(impossible)
    exit(0)

array.sort()

btw = [v1 - v2 for v1, v2 in zip(array[1:], array[0:])]
n = sorted(btw)[0]

same = len(set(btw)) == 1 or all([v % n == 0 for v in btw])

if b in array:
    print(possible)
elif array[-1] < b:
    print(impossible)
elif same and (b - array[0]) % n == 0:
    print(possible)
else:
    print(impossible)