Harryxun/stf_run huggingface dataset:
from sys import stdin
# input = stdin.readline().rstrip

"""
まず一般に剰余込みでの組み合わせの計算。
n!, (n!)^{-1} mod pの値を配列にまとめておき、nCr = (n!)/(r!)((n-r)!)をO(1)で計算する。

max = (用意する配列の最大長)
mod = （剰余）

(n!)^{-1}の計算は¥Prod_i i^{-1}を計算して求める。
i^{-1} mod pの計算はフェルマーの小定理より、mod pにおいて
0 = p = (p // i) * i + (p % i)
0 = (p // i) + (p % i) * i^{-1}
i^{-1} = -(p // i) * (p % i)^{-1}
"""

max = 10**6
mod = 10**9+7
fact = [1, 1] # fact[n] = (n! mod p)
factinv = [1, 1] # factinv[n] = ((n!)^{-1} mod p)
inv = [0, 1] # inv[n] = (n^{-1} mod p)

for i in range(2, max+1):
    fact.append(fact[-1] * i % mod)
    inv.append(-inv[mod % i] * (mod // i) % mod)
    factinv.append(factinv[-1] * inv[-1] % mod)

def cmb(n, r):
    if r < 0 or r > n:
        return 0
    else:
        r = min(r, n-r)
        return fact[n] * factinv[r] * factinv[n-r] % mod


"""
いよいよ本題。
まずは¥Sum_{0¥le i¥le x, 0¥le j¥le y} _{i+j}C_iを計算する。
実際今回の問題は容易にこれに帰着可能。

¥Sum_{0¥le i¥le x, 0¥le j¥le y} _{i+j}C_i
    = ¥Sum_i (¥Sum_j _{i+j}C_i)
    = ¥Sum_i {(T+1)^i + (T+1)^{i+1} + ... + (T+1)^{i+y})のT^iの係数}
    = ¥Sum_i {¥frac{(1+T)^{i+y+1} - (1+T)^i}{T}のT^iの係数}
    = ¥Sum_i _{i+y+1}C_{i+1}

    = ¥Sum_i _{i+y+1}C_y
    = _{y+1}C_y + _{y+2}C_y + ... + _{y+x+1}C_y
    = {(1+T)^{y+1} + (1+T)^{y+2} + ... (1+T)^{y+x+1}のT^yの係数}
    = {¥frac{(1+T)^{x+y+2} - (1+T)^{y+1}}{T}のT^yの係数}
    = _{x+y+2}C_{y+1} - 1
"""
r1, c1, r2, c2 = map(int, input().split())
a = cmb(r2+c2+2, c2+1) - 1
b = cmb(r1+c2+1, c2+1) - 1
c = cmb(r2+c1+1, r2+1) - 1
d = cmb(r1+c1, r1) - 1
ans = a - b - c + d
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline().rstrip

"""
まず一般に剰余込みでの組み合わせの計算。
n!, (n!)^{-1} mod pの値を配列にまとめておき、nCr = (n!)/(r!)((n-r)!)をO(1)で計算する。

max = (用意する配列の最大長)
mod = （剰余）

(n!)^{-1}の計算は¥Prod_i i^{-1}を計算して求める。
i^{-1} mod pの計算はフェルマーの小定理より、mod pにおいて
0 = p = (p // i) * i + (p % i)
0 = (p // i) + (p % i) * i^{-1}
i^{-1} = -(p // i) * (p % i)^{-1}
"""

max = 10**6 * 2 + 3 # ここでRE出しまくってた。。。
mod = 10**9+7
fact = [1, 1] # fact[n] = (n! mod p)
factinv = [1, 1] # factinv[n] = ((n!)^{-1} mod p)
inv = [0, 1] # inv[n] = (n^{-1} mod p)

for i in range(2, max+1):
    fact.append(fact[-1] * i % mod)
    inv.append(-inv[mod % i] * (mod // i) % mod)
    factinv.append(factinv[-1] * inv[-1] % mod)

def cmb(n, r):
    if r < 0 or r > n:
        return 0
    else:
        r = min(r, n-r)
        return fact[n] * factinv[r] * factinv[n-r] % mod


"""
いよいよ本題。
まずは¥Sum_{0¥le i¥le x, 0¥le j¥le y} _{i+j}C_iを計算する。
実際今回の問題は容易にこれに帰着可能。

¥Sum_{0¥le i¥le x, 0¥le j¥le y} _{i+j}C_i
    = ¥Sum_i (¥Sum_j _{i+j}C_i)
    = ¥Sum_i {(T+1)^i + (T+1)^{i+1} + ... + (T+1)^{i+y})のT^iの係数}
    = ¥Sum_i {¥frac{(1+T)^{i+y+1} - (1+T)^i}{T}のT^iの係数}
    = ¥Sum_i _{i+y+1}C_{i+1}

    = ¥Sum_i _{i+y+1}C_y
    = _{y+1}C_y + _{y+2}C_y + ... + _{y+x+1}C_y
    = {(1+T)^{y+1} + (1+T)^{y+2} + ... (1+T)^{y+x+1}のT^yの係数}
    = {¥frac{(1+T)^{x+y+2} - (1+T)^{y+1}}{T}のT^yの係数}
    = _{x+y+2}C_{y+1} - 1
"""
r1, c1, r2, c2 = map(int, input().split())
a = cmb(r2+c2+2, c2+1) - 1
b = cmb(r1+c2+1, c2+1) - 1
c = cmb(r2+c1+1, r2+1) - 1
d = cmb(r1+c1, r1) - 1
ans = a - b - c + d
print(ans % mod)
(N,M) = map(int,input().split())
r = int32(-1)
for i in range(M):
  A = list(map(int,input().split()))
  A.pop(0)
  c = 0
  for a in A:
    c |= (1 << (a-1))
  d &= c

ans = sum([(d>>n)&1 for n in range(n)])
print(ans)

### FIXED CODE ###

import numpy as np

(N,M) = map(int,input().split())
B = np.ones(M,dtype=np.int)

for _ in range(N):
    A = np.array(list(map(int,input().split())))[1:]
    for i in range(M):
        if not i+1 in A:
            B[i] = 0
print(B.sum())
= int(input())
A = list(map(int,input().split()))
j = abs(A[0]) + abs(A[N-1])
for i in range(N-1):
    j += abs(A[i]-A[i+1])
for i in range(N):
    if i == 0:
        ans = j-abs(A[0])-abs(A[0]-A[1])+abs(A[1])
    elif i == N-1:
        ans = j-abs(A[N-2]-A[N-1])-abs(A[N-1])+abs(A[N-2])
    else:
        ans = j - abs(A[i]-A[i-1]) - abs(A[i]-A[i+1]) + abs(A[i-1]-A[i+1])
    print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
j = abs(A[0]) + abs(A[N-1])
for i in range(N-1):
    j += abs(A[i]-A[i+1])
for i in range(N):
    if i == 0:
        ans = j-abs(A[0])-abs(A[0]-A[1])+abs(A[1])
    elif i == N-1:
        ans = j-abs(A[N-2]-A[N-1])-abs(A[N-1])+abs(A[N-2])
    else:
        ans = j - abs(A[i]-A[i-1]) - abs(A[i]-A[i+1]) + abs(A[i-1]-A[i+1])
    print(ans)
from sys import stdin, setrecursionlimit

setrecursionlimit(200000)


def main():
    def walk(p, c):
        if visited[p]:
            return
        visited[p] = True
        cnt[p] += c
        for n in tree[p]:
            walk(n, cnt[p])

    n, q = [int(x) for x in stdin.readline().split()]

    tree = [[] for _ in range(n + 1)]
    for _ in range(n - 1):
        a, b = [int(x) for x in stdin.readline().split()]
        tree[a].append(b)
        tree[b].append(a)

    cnt = [0] * (n + 1)
    for _ in range(q):
        p, x = [int(x) for x in stdin.readline().split()]
        cnt[p] += x

    visited = [False] * (n + 1)
    walk(1, 0)

    print(*cnt[1:])


main()


### FIXED CODE ###

from sys import stdin, setrecursionlimit

setrecursionlimit(1000000)


def main():
    def read_tree(n):
        parents = [0 for _ in range(n + 1)]
        for _ in range(n - 1):
            a, b = [int(x) for x in input().split()]
            parents[b] = a
        return parents

    n, q = [int(x) for x in input().split()]

    parents = read_tree(n)
    cnt = [0] * (n + 1)

    for _ in range(q):
        p, x = [int(x) for x in input().split()]
        cnt[p] += x
    
    for i in range(1, n + 1):
        cnt[i] += cnt[parents[i]]

    for i in range(1, n + 1):
        print(cnt[i], end=" ")


main()
n, k, q = map(int, input().split())
A = [int(i) for i in input().split()]

start = [k - q] * n
for i in range(q):
    start[A[i]] += 1

for i in range(n):
    if start[i] > 0:
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

n, k, q = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(q)]
start = [k - q] * n

for i in range(q):
    start[a[i][0] - 1] += 1

for i in range(n):
    if start[i] > 0:
        print('Yes')
    else:
        print('No')
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
  int H,N,A,B;
  cin >> H >> N;
  vector<int> dp(H+1,100000001);
  dp[0] = 0;
  for(int n=0; n<N; n++){
    cin >> A >> B;
    for(int h=1; h<H+1; h++){
      dp[h] = min(dp[h],dp[max(0,h-A)]+B);
    }
  }
  cout << dp[H] << endl;
}

### FIXED CODE ###

H,N,*AB = map(int, open(0).read().split())
dp = [0]+[10**8]*H
for n in range(N):
  A,B = AB[2*n:2*(n+1)]
  for h in range(1,H+1): dp[h] = min(dp[h],dp[max(0,h-A)]+B)
print(dp[-1])
year, month, day = [int(item) for item in S.split('/')]

if (int(year) >= 2019) & (int(month) >= 5):
	print('TBD')
else:
	print('Heisei')

### FIXED CODE ###

S = input()

year, month, day = [int(item) for item in S.split('/')]

if (int(year) >= 2019) & (int(month) >= 5):
	print('TBD')
else:
	print('Heisei')
print(N^3)

### FIXED CODE ###

N=int(input())
print(N**3)
a,b = map(int,input().split())
print(a*b)

### FIXED CODE ###

str = input()
if str.islower():
    print('a')
else:
    print('A')
from fraction import gcd
n, x =map(int,input().split())
s = list(map(int,input().split()))
s.sort()
a, b = x - s[0], s[-1] - x
visit = [0] * n
while sum(visit) != n:
    visit = [0] * n
    y = gcd(a, b)
    i = 0
    while s[0] + y * i <= s[-1] :
        if s[0] + y * i in s:
            visit[s.index(s[0] + y * i)] = 1
        i += 1
    a,b = min(a, b), y
print(y)



### FIXED CODE ###

from fractions import gcd
n, x =map(int,input().split())
s = list(map(int,input().split()))
y = abs(s[0] - x)
for i in range(1,n):
    y = gcd(y, abs(s[i] - x))
print(y)
N,K = map(int,input().split())
la = list(map(int,input().split()))
la = sorted(la,key=abs,reverse=True)
lg = la[:K]
lgp = []
lgm = []
lr = la[K:]
lrp = []
lrm = []
for a in lg:
    if a >= 0:
        lgp.append(a)
    else:
        lgm.append(a)
for a in lr:
    if a >= 0:
        lrp.append(a)
    else:
        lrm.append(a)
if len(lgm) % 2 == 1:
    if len(lrp) > 0:
        lg.pop(l.index(lgm[len(lgm) - 1]))
        lg.append(lrp[0])
    else:
        if len(lrm) > 0:
            if len(lgp) > 0:
                lg.pop(l.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
            else:
                lg = la[N - K:]
ans = 1
for a in lg:
    ans *= a
    ans %= 10 ** 9 + 7
print(ans)



### FIXED CODE ###

N,K = map(int,input().split())
la = list(map(int,input().split()))
la = sorted(la)
la = sorted(la,key=abs,reverse=True)
lg = la[:K]
lgp = []
lgm = []
lr = la[K:]
lrp = []
lrm = []
for a in lg:
    if a >= 0:
        lgp.append(a)
    else:
        lgm.append(a)
for a in lr:
    if a >= 0:
        lrp.append(a)
    else:
        lrm.append(a)
if len(lgm) % 2 == 1:
    if len(lrp) > 0 and len(lrm) > 0:
        if len(lgp) > 0 and len(lgm) > 0:
            if lgp[len(lgp) - 1] * lrp[0] > lgm[len(lgm) - 1] * lrm[0]:
                lg.pop(lg.index(lgm[len(lgm) - 1]))
                lg.append(lrp[0])
            else:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
        else:
            if len(lgp) > 0:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
            else:
                lg.pop(lg.index(lgm[len(lgm) - 1]))
                lg.append(lrp[0])
    elif len(lrp) > 0:
        if len(lgm) > 0:
            lg.pop(lg.index(lgm[len(lgm) - 1]))
            lg.append(lrp[0])
        else:
            lg = la[N - K:]
    elif len(lrm) > 0:
        if len(lgp) > 0:
            lg.pop(lg.index(lgp[len(lgp) - 1]))
            lg.append(lrm[0])
        else:
            lg = la[N - K:]
ans = 1
for a in lg:
    ans *= a
    ans %= 10 ** 9 + 7
print(ans)
ln=input()
s=input()
if len(s)%2:
	print("No")
elif s[:((len(s)/2)]==s[(len(s)/2):]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

ln=input()
s=input()
if len(s)%2:
    print("No")
elif s[:(len(s)//2)]==s[(len(s)//2):]:
    print("Yes")
else:
    print("No")
n = int(input())

sum = 0
i = 0

for i in range(n+1):
  x = int(input())
  sum *= x
  i += 1
  
  if sum > 10 ** 18:
    print(-1)
    break
    
print(sum)


### FIXED CODE ###

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

print(a * b)
a,b,c=map(int,input.split())
print('Yes')if sum(a,b,c) == max(a,b,c)*2 else print('No')

### FIXED CODE ###

a,b,c=map(int,input().split())
print('Yes')if a+b+c == max(a,b,c)*2 else print('No')
import numpy as np
N, K, Q = map(int, input().split())
A = np.array([int(input()) for _ in range(Q)])

base = K - Q

u, counts = np.unique(A, return_counts=True)

for i in range(N): 
    if base > 0:
        print('Yes')
    else:
        n = i + 1
        if n in u:
            if base + counts[u == n] > 0:
                print('Yes')
            else:
                print('No')
        else:
            print('No')

### FIXED CODE ###

from collections import defaultdict

N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]

base = K - Q

d = defaultdict(int)
for a in A:
    d[a] += 1

for i in range(N): 
    if base > 0:
        print('Yes')
    else:
        n = i + 1
        if base + d[n] > 0:
            print('Yes')
        else:
            print('No')
import bisect

N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for i in range(M)]

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1]:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R>=b:
            if b>=n:
                A=[]
                ans+=b*c
                break
            else:
                del A[0:b]
                ans+=b*c
        else:
            del A[0:R]
            ans+=R*c
        
print(sum(A)+ans)

### FIXED CODE ###

import bisect

N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for i in range(M)]

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1]:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R>b:
            if n<=b:
                A=[]
                ans+=n*c
                break
            else:
                del A[0:b]
                ans+=b*c
        else:
            del A[0:R]
            ans+=R*c
    if len(A)==0:
        break        
print(sum(A)+ans)
import numpy as np
import sys

input = sys.stdin.readline

md = 10 ** 9 + 7
n, k = map(int, input().split())
a = np.array([list(map(int, input().split())) for _ in range(n)], dtype="O")
c = np.eye(n, dtype="O")

while k:
    if k & 1:
        c = np.dot(a, c) % md
    a = np.dot(a, a) % md
    k >>= 1
print(np.sum(c) % md)


### FIXED CODE ###

import sys

input = sys.stdin.readline


def dot(a, b):
    c = [[0] * n for _ in range(n)]
    for i, ai in enumerate(a):
        for j, bj in enumerate(zip(*b)):
            c[i][j] = sum(ak * bk for ak, bk in zip(ai, bj)) % md
    return c


def pwr(a, k):
    c = None
    while c == None:
        if k & 1:
            c = a
        a = dot(a, a)
        k >>= 1

    while k > 0:
        if k & 1:
            c = dot(a, c)
        a = dot(a, a)
        k >>= 1
    return c


md = 10 ** 9 + 7
n, k = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
print(sum([sum(pk) % md for pk in pwr(a, k)]) % md)
a, b = map(int, input().split())

printf((a + b) % 24)

### FIXED CODE ###

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

print((a + b) % 24)
#include <bits/stdc++.h>

using namespace std;
using i64 = int64_t;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    vector<int> A(N);
    for(auto&& x:A)cin >> x;
    sort(A.begin(), A.end());
    int sum = 0;
    for(int i=1;i<N-1;i++)sum += abs(A[i]);
    cout << A[N-1] + sum - A[0] << endl;
    for(int i=1;i<N-1;i++){
        if(A[i] < 0){
            cout << A[N-1] << " " << A[i] << endl;
            A[N-1] -= A[i];
        }else{
            cout << A[0] << " " << A[i] << endl;
            A[0] -= A[i];
        }
    }
    cout << A[N-1] << " " << A[0] << endl;
    return 0;
}

### FIXED CODE ###

from collections import defaultdict, deque
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))
N = int(input())
A = sorted(inpl())

print(A[-1] + sum(map(abs, A[1:-1])) - A[0])
for i in range(N-2, 0, -1):
  a = A[i]
  if a > 0:
    print(A[0], a)
    A[0] -= a
  else:
    print(A[-1], a)
    A[-1] -= a
print(A[-1], A[0])
n = int(input())
a = list(map(int, input().split()))

l = []
for i in range(n):
    x = index(i + 1) + 1
    l.append(x)
    
print(' ', join(l))

### FIXED CODE ###

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

l = [0] * n

for i in range(n):
    l[a[i] - 1] = i + 1

print(*l)
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
logging.disable(logging.CRITICAL)

N, X  = (int(x) for x in input().split())
L = list(int(x) for x in input().split())

logging.info(L)

length = 0
counter = 1

for i in L:
    length += i
    if length <= X:
        counter++
    
print(counter)


### FIXED CODE ###

import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
logging.disable(logging.CRITICAL)

N, X  = (int(x) for x in input().split())
L = list(int(x) for x in input().split())

logging.info(L)

length = 0
counter = 1

for i in L:
    length += i
    if length <= X:
        counter += 1
    
print(counter)
a = int(input())
print(a.replace(1,x).replace(9,1).replace(x,9))

### FIXED CODE ###

a = input()
print(a.replace("1","x").replace("9","1").replace("x","9"))
A,B=map(int,input().split())
count=0
if i>=A and i<=B:
    for j in i:
        array_i=list(map(int,str(j)))
        if array_i==reverse(array_i):
            count+=1
print(count)

### FIXED CODE ###

A,B=map(int,input().split())
count=0
for i in range(A,B+1):
        if str(i)==str(i)[::-1]:
            count+=1
print(count)
S=input()
for i in range(len(S)):
    if S[i]==S[i+1]:
        print('Bad')
    else:
        print('Good')

### FIXED CODE ###

S=input()
if S[0]!=S[1] and S[1]!=S[2] and S[2]!=S[3]:
    print('Good')
else:
    print('Bad')
# n=int(input())
# a,b=map(int, input().split())
# c=list(map(int, input().split()))
# s=[list(map(int,list(input()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# a=100
# b=0.987654321
# print('{0:06d}-{1:6f}'.format(a,b))  # 0埋めのときの出力
# 000100-0.987654

import numpy as np
import math
import copy

n,x=map(int, input().split())
l=list(map(int, input().split()))

bound = 1
pos = 0

for i in range(n + 1):
    pos += l[i]
    if pos > x:
        break
    bound += 1

print(bound)

### FIXED CODE ###

# n=int(input())
# a,b=map(int, input().split())
# c=list(map(int, input().split()))
# s=[list(map(int,list(input()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# a=100
# b=0.987654321
# print('{0:06d}-{1:6f}'.format(a,b))  # 0埋めのときの出力
# 000100-0.987654

import numpy as np
import math
import copy

n,x=map(int, input().split())
l=list(map(int, input().split()))

bound = 1
pos = 0

for i in range(n):
    pos += l[i]
    if pos > x:
        break
    bound += 1

print(bound)
N, M, X = map(int,input().split())
A = list(map(int,input().split()))

count_low = 0
count_high = 0
for i in range(A):
  if A[i] > X:
    count_high +=1
  elif A[i] < X:
    count_low += 1
    
if count_low >= count_high:
  print(count_high)
elif count_low < count_high:
  print(count_low)


### FIXED CODE ###

N, M, X = map(int,input().split())
A = list(map(int,input().split()))
a = len(A)

count_low = 0
count_high = 0
for i in range(a):
  if A[i] > X:
    count_high +=1
  elif A[i] < X:
    count_low += 1
    
if count_low >= count_high:
  print(count_high)
elif count_low < count_high:
  print(count_low)
cards = int(input())
i = 0
cardlist = []
while(i < cards):
    cardlist.append(list(map(str,input().split())))
    i += 1
SP = [0] * 13
HR = [0] * 13
CL = [0] * 13
DY = [0] * 13
    
for i in cardlist:
    num = int(i[1])
    if  (i[0] == "S"):
        SP[num] = 1
    elif(i[0] == ""H"):
        HR[num] = 1
    elif(i[0] == "C"):
        CL[num] = 1
    elif(i[0] == "D"):
        DY[num] = 1

c = 0
for i in SP:
    c += 1
    if i == 1:
        print("S %d" %c)
c = 0
for i in HR:
    c += 1
    if i == 1:
        print("H %d" %c)
c = 0
for i in CL:
    if i == 1:
        print("C %d" %c)
c = 0
for i in DY:
    if i == 1:
        print("D %d" %c)
print()


### FIXED CODE ###

cards = int(input())
i = 0
cardlist = []
while(i < cards):
    cardlist.append(list(map(str,input().split())))
    i += 1
SP = [False] * 13
HR = [False] * 13
CL = [False] * 13
DY = [False] * 13

for i in cardlist:
    num = int(i[1])-1
    if  (i[0] == "S"):
        SP[num] = True
    elif(i[0] == "H"):
        HR[num] = True
    elif(i[0] == "C"):
        CL[num] = True
    elif(i[0] == "D"):
        DY[num] = True

c = 0
for i in SP:
    c += 1
    if i == False:
        print("S %d" %c)
c = 0
for i in HR:
    c += 1
    if i == False:
        print("H %d" %c)
c = 0
for i in CL:
    c += 1
    if i == False:
        print("C %d" %c)
c = 0
for i in DY:
    c += 1
    if i == False:
        print("D %d" %c)
a, b, c = map(int, input().split())

if c-a-b < 0:
    print('No')
else:
    ans = 4*a*b < (c-a-b)**2

print('Yes' if ans else 'No')


### FIXED CODE ###

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

if c-a-b < 0:
    print('No')
    exit()
else:
    ans = 4*a*b < (c-a-b)**2

print('Yes' if ans else 'No')
s = int(input())

if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Good")

### FIXED CODE ###

S = input()

s = list(S)

if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Good")
from bisect import bisect_left, bisect_right
input = sys.stdin.readline

n = int(input())
col_maxs = []
for _ in range(n):
    a = int(input()) * (-1)
    if not col_maxs:
        col_maxs.append(a)
        continue

    curr_max = col_maxs[-1]
    if a >= curr_max:
        col_maxs.append(a)
    else:
        # aより大きい最小要素のindex/value
        ind = bisect_right(col_maxs, a)
        col_maxs[ind] = a

print(len(col_maxs))

### FIXED CODE ###

import bisect
import sys
input = sys.stdin.readline

n = int(input())
colors_maxs = []

colors_maxs.append(int(input()) *(-1) )
for _ in range(n-1):
    a = int(input()) * (-1)
    if colors_maxs[-1] <= a:
        colors_maxs.append(a)
    else:
        ind = bisect.bisect_right(colors_maxs, a) # -> 4
        colors_maxs[ind] = a

print(len(colors_maxs))
n = int(input())

if n%2==0:
  print(0.5)
else:
  answer = (n/2+1)/na
  print(answer)

### FIXED CODE ###

n = int(input())

if n%2==0:
  print(0.5)
else:
  answer = (int(n/2)+1)/n
  print(answer)
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1001):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1001):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == k):
      print(i)
      exit()
print(-1)

### FIXED CODE ###

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

for i in range(1,1024):
  if i//12.5 == a and i//10 == b:
    print(i)
    exit()
print(-1)
s=input()

if s[3]==s[4] and s[5]==s[6]:
	print("sはcoffeeと似ています")
	else:
    print("sはcoffeeと似ていません")


### FIXED CODE ###

s = input()

if((s[2]==s[3]) and (s[4]==s[5])):
  	print("Yes")
else:
	print("No")
n = int(input())
li = list(map(int,input()))
count = 0
for i in range(n):
  if(li[i] != i+1):
    count += 1
if(count == 0 or count == 2):
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n = int(input())
li = list(map(int,input().split()))
count = 0
for i in range(n):
  if(li[i] != i+1):
    count += 1
if(count == 0 or count == 2):
  print("YES")
else:
  print("NO")
x,a=(int(i) for i in input().split())
t=if(x>=a)
print(t*10)

### FIXED CODE ###

x,a=(int(i) for i in input().split())
if x>=a:
  print(10)
else:
  print(0)
# coding: utf-8
import sys
A = []
A.append(map(int, raw_input().split()))
A.append(map(int, raw_input().split()))
A.append(map(int, raw_input().split()))

a = [[0,0,0],[0,0,0],[0,0,0]]

N = int(raw_input())
for i in range(N):
    b = int(raw_input())
    for j in range(3):
        if b in A[j]:
            a[j][A[j].index(b)] = 1

if 0 not in a[0]:
    print 'Yes'    
    sys.exit()
if 0 not in a[1]:
    print 'Yes'
    sys.exit()
if 0 not in a[2]:
	print 'Yes'
    sys.exit()
if a[0][0]*a[1][0]*a[2][0] == 1:
    print 'Yes'
    sys.exit()
if a[0][1]*a[1][1]*a[2][1] == 1:
    print 'Yes'
    sys.exit()
if a[0][2]*a[1][2]*a[2][2] == 1:
    print 'Yes'
    sys.exit()

if a[0][0]*a[1][1]*a[2][2] == 1:
    print 'Yes'
    sys.exit()
if a[0][2]*a[1][1]*a[2][0] == 1:
    print 'Yes'
    sys.exit()

### FIXED CODE ###

# coding: utf-8
import sys

A = []
A.append(list(map(int, input().split())))
A.append(list(map(int, input().split())))
A.append(list(map(int, input().split())))

a = [[0,0,0],[0,0,0],[0,0,0]]

N = int(input())
for i in range(N):
    b = int(input())
    for j in range(3):
        if b in A[j]:
            a[j][A[j].index(b)] = 1

flag = False

for i in range(3):
    if 0 not in a[i]: flag = True
    if a[0][i]*a[1][i]*a[2][i] == 1: flag = True
    
if a[0][0]*a[1][1]*a[2][2] == 1: flag = True
if a[0][2]*a[1][1]*a[2][0] == 1: flag = True

print('Yes') if flag == True else print('No')
n, k = map(int,input().split())
a = list(map(int,input().split()))
d = {}
count = 0
for i in a:
  if i not in d.keys():
    d[i] = 1
  else:
    d[i] += 1
d = sorted(d.values())
for i, j in enumerate(d):
  if len(d) > k:
    count += j
    del d[i]
  else:
    break
print(count)

### FIXED CODE ###

print(input().count("1"))