Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

rcnt = s.count('R')
gcnt = s.count('G')
bcnt = s.count('B')

sub = 0
for i in range(n):
    for j in range(i+1, n):
        k = j + (j - i)
        if n <= k: break

        alp = set()
        alp.add(s[i])
        alp.add(s[j])
        alp.add(s[k])

        if len(alp) == 3: sub += 1

ans = rcnt * gcnt * bcnt - sub
print(ans)

Fixed submission:
n = int(input())
s = input()

rcnt = s.count('R')
gcnt = s.count('G')
bcnt = s.count('B')

sub = 0
for i in range(n):
    for j in range(i+1, n):
        k = j + (j - i)
        if n <= k: break

        alp = set()
        alp.add(s[i])
        alp.add(s[j])
        alp.add(s[k])

        if len(alp) == 3: sub += 1

ans = rcnt * gcnt * bcnt - sub
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

rcnt = s.count('R')
gcnt = s.count('G')
bcnt = s.count('B')

sub = 0
for i in range(n):
    for j in range(i+1, n):
        k = j + (j - i)
        if n <= k: continue

        alp = set()
        alp.add(s[i])
        alp.add(s[j])
        alp.add(s[k])

        if len(alp) == 3: sub += 1

ans = rcnt * gcnt * bcnt - sub
print(ans)

Fixed submission:
n = int(input())
s = input()

rcnt = s.count('R')
gcnt = s.count('G')
bcnt = s.count('B')

sub = 0
for i in range(n):
    for j in range(i+1, n):
        k = j + (j - i)
        if n <= k: break

        alp = set()
        alp.add(s[i])
        alp.add(s[j])
        alp.add(s[k])

        if len(alp) == 3: sub += 1

ans = rcnt * gcnt * bcnt - sub
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

a, b, h, m = [int(input()) for i in range(4)]

m_rad = 6 * m
h_rad = 0.5 * 60 * h + 0.5 * m

if abs(m_rad - h_rad) == 0:
    print(b - a)
elif abs(m_rad - h_rad) == 180:
    print(a + b)
else:
    print(math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(abs(m_rad - h_rad)))))

Fixed submission:
import math
a, b, h, m = map(int, input().split())
m_rad = 6 * m
h_rad = 0.5 * 60 * h + 0.5 * m
length = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(abs(m_rad - h_rad))))
print('{:.20f}'.format(length))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().strip().split()))
q = int(input())

import collections

counter = collections.Counter(a)

result = 0
for j in range(q):
  b,c = list(map(int,input().strip().split()))
  if c in counter:
    counter[c] += counter[b]
  else:
    counter[c] = counter[b]
  counter[b] = 0
  result = 0
  for i in counter:
    result += i * counter[i]
  print(result)

Fixed submission:
n = int(input())
a = list(map(int,input().strip().split()))
q = int(input())

import collections

result = sum(a)
counter = collections.Counter(a)

for j in range(q):
  b,c = list(map(int,input().strip().split()))
  if c in counter:
    counter[c] += counter[b]
  else:
    counter[c] = counter[b]
  result += (c-b) * counter[b]
  counter[b] = 0
  print(result)
Buggy python submission (verdict: Runtime Error):
import sys
n = input()
a = list(map(int, input().split()))

if 0 in a:
  pirnt(0)
  sys.exit(0)

s = 1
for x in a:
  s *= x
  if s > 1000000000000000000:
    break
if s > 1000000000000000000:
  print(-1)
else:
  print(s)


Fixed submission:
import sys

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

if 0 in a:
  print(0)
  sys.exit(0)

s = 1
for x in a:
  s *= x
  if s > 1000000000000000000:
    break
if s > 1000000000000000000:
  print(-1)
else:
  print(s)

Buggy python submission (verdict: Time Limit Exceeded):
n = input()
a = list(map(int, input().split()))

s = 1
for x in a:
  s *= x
if s > 1000000000000000000:
  print(-1)
else:
  print(s)


Fixed submission:
import sys

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

if 0 in a:
  print(0)
  sys.exit(0)

s = 1
for x in a:
  s *= x
  if s > 1000000000000000000:
    break
if s > 1000000000000000000:
  print(-1)
else:
  print(s)
Buggy python submission (verdict: Runtime Error):
a = input()
if a is 'ABC':
  print('ARC')
eles:
  print('ABC')

Fixed submission:
a = input()
if a == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
a = input()
if a is 'ABC':
  print('ARC')
eles:
  print('ABC')

Fixed submission:
a = input()
if a == 'ABC':
  print('ARC')
else:
  print('ABC')
Buggy python submission (verdict: Runtime Error):
a, b, c, d = list(map(int, input().split()))
while True:
  c -= b
  if c <= 0:
    print('Yes')
    break
  a -= d
  if a <= 0:
    pinrt('No')
    break


Fixed submission:
a, b, c, d = list(map(int, input().split()))
while True:
  c -= b
  if c <= 0:
    print('Yes')
    break
  a -= d
  if a <= 0:
    print('No')
    break
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
c = [] * n
for x in a:
  c[x-1] += 1
for x in c:
  print(x)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
c = [0] * n

for x in a:
  c[x-1] += 1
for x in c:
  print(x)
Buggy python submission (verdict: Runtime Error):
n = int(input())

ans = 1000000000000

a = 1
while a * a <= n:
	if n % a != 0:
      continue
    b = n % a
    ans = min(ans, a + b - 2)
    a += 1

print(ans)

Fixed submission:
n = int(input())

ans = 1000000000000

a = 1
while a * a <= n:
  if n % a != 0:
    a += 1
    continue
  b = n // a
  ans = min(ans, a + b - 2)
  a += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
s = set()
for c in n:
  s.add(c)
if s.len() == 4:
  print("Good")
else:
  print("Bad")

Fixed submission:
n = input()
for i in range(0, 3):
  if n[i] == n[i+1]:
    print("Bad")
    exit(0)
print("Good")

Buggy python submission (verdict: Runtime Error):
n = input()
s = set()
for c in n:
  s.push(c)
if s.len() == 4:
  print("Good")
else:
  print("Bad")

Fixed submission:
n = input()
for i in range(0, 3):
  if n[i] == n[i+1]:
    print("Bad")
    exit(0)
print("Good")
Buggy python submission (verdict: Runtime Error):
w, h, x, y = list(map(int, input().split()))

center = 1 if x == w / 2 and y == h / 2 else 0

print((w * h / 2) + ' ' + center)

Fixed submission:
w, h, x, y = list(map(int, input().split()))

center = 1 if x == w / 2 and y == h / 2 else 0

print(str(w * h / 2) + ' ' + str(center))
Buggy python submission (verdict: Runtime Error):
import itertools
costs = [int(x) for x in input().split()]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 and c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)

Fixed submission:
import itertools
costs = [int(input()) for _ in range(0, 5)]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 and c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)

Buggy python submission (verdict: Runtime Error):
import itertools
costs = [int(x) for x in input().split()]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 && c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)

Fixed submission:
import itertools
costs = [int(input()) for _ in range(0, 5)]
ans = 1000000000000
for x in itertools.permutations([0, 1, 2, 3, 4]):
  c = 0
  for i in range(0, 5):
    c += costs[x[i]]
    if i != 4 and c % 10 != 0:
      c += 10 - c % 10
  ans = min(c, ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
y, m, d = input().split('/')
if m <= 4:
  print('Heisei')
else:
  print('TBD')


Fixed submission:
y, m, d = list(map(int, input().split('/')))
if m <= 4:
  print('Heisei')
else:
  print('TBD')
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = set()
s.append(n)
i = 1
while True:
  i += 1
  if n % 2 == 0:
    n = n / 2
  else:
    n = 3 * n + 1
  if n in s:
    print(i)
  s.add(n)

Fixed submission:
n = int(input())
s = set()
s.add(n)
i = 1
while True:
  i += 1
  if n % 2 == 0:
    n = n / 2
  else:
    n = 3 * n + 1
  if n in s:
    print(i)
    break
  s.add(n)
Buggy python submission (verdict: Runtime Error):
x, y = list(map(int, input.split()))
print(x + y // 2)

Fixed submission:
x, y = list(map(int, input().split()))
print(x + y // 2)
Buggy python submission (verdict: Runtime Error):
n = int(input())

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

h = list(map(int, input().split()))

h = list(map(lambda i, x: (t - x * 0.006, i), enumerate(h)))

h.sort()

print(h[0][1] + 1)

Fixed submission:
n = int(input())

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

h = list(map(int, input().split()))

h = list(map(lambda x: (abs(a - (t - x[1] * 0.006)), x[0]), enumerate(h)))

h.sort()

print(h[0][1] + 1)
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n == 1:
  print('Hello World')
else:
  a, b = list(map(int, input().split()))
  print(a + b)

Fixed submission:
n = int(input())

if n == 1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a + b)
Buggy python submission (verdict: Runtime Error):
N, T = list(map(int, input().split()))

path = []
for _ in range(N):
  c, t = list(map(int, input().split()))
  if t <= T:
    path.append(c)
sort(path)
reverse(path)
if len(path) > 0:
  print(path[0])
else:
  print(path[0])

Fixed submission:
N, T = list(map(int, input().split()))

path = []
for _ in range(N):
  c, t = list(map(int, input().split()))
  if t <= T:
    path.append(c)
path.sort()
if len(path) > 0:
  print(path[0])
else:
  print('TLE')
Buggy python submission (verdict: Runtime Error):
n = int(input())

words = {}
w = ''
ok = True
for i in range(n):
  nw = input()
  if nw in words:
    ok = False
    break
  words.add(w)
  if w && w[-1] != nw[0]:
    ok = False
  w = nw

if ok:
  print('Yes')
else:
  print('No')


Fixed submission:
n = int(input())

words = set()
w = ''
ok = True
for i in range(n):
  nw = input()
  if nw in words:
    ok = False
    break
  words.add(w)
  if w and w[-1] != nw[0]:
    ok = False
  w = nw

if ok:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())

words = {}
w = ''
ok = True
for i in range(n):
  nw = input()
  if nw in words:
    ok = False
    break
  words.add(w)
  if w and w[-1] != nw[0]:
    ok = False
  w = nw

if ok:
  print('Yes')
else:
  print('No')


Fixed submission:
n = int(input())

words = set()
w = ''
ok = True
for i in range(n):
  nw = input()
  if nw in words:
    ok = False
    break
  words.add(w)
  if w and w[-1] != nw[0]:
    ok = False
  w = nw

if ok:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())

words = {}
w = ''
ok = True
for i in range(n):
  nw = input()
  if nw in words:
    ok = False
    break
  words.add(w)
  if w && w[-1] != nw[0]:
    ok = False
  w = nw

if ok:
  print('Yes')
else:
  print('No')

Fixed submission:
n = int(input())

words = set()
w = ''
ok = True
for i in range(n):
  nw = input()
  if nw in words:
    ok = False
    break
  words.add(w)
  if w and w[-1] != nw[0]:
    ok = False
  w = nw

if ok:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import fractions

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

d = list(map(int, input().split()))

m = (d[0] - x).abs()
for di in d:
  m = fractions.gcd(m, (di - x).abs())

print(m)

Fixed submission:
import fractions

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

d = list(map(int, input().split()))

m = abs(d[0] - x)
for di in d:
  m = fractions.gcd(m, abs(di - x))

print(m)
Buggy python submission (verdict: Runtime Error):
import sympy

sympy.divisors(10**9)

n = int(input())
print(len(list(filter(lambda x: len(sympy.divisors(x)) == 8, range(1, n + 1,2)))))


Fixed submission:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n = int(input())
print(len(list(filter(lambda x: len(make_divisors(x)) == 8, range(1, n + 1,2)))))

Buggy python submission (verdict: Runtime Error):
import sympy

sympy.divisors(10**9)

n = int(input())
print(len(list(filter(lambda x: len(sympy.divisors(x)) == 8, range(1, n + 1,2)))))


Fixed submission:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n = int(input())
print(len(list(filter(lambda x: len(make_divisors(x)) == 8, range(1, n + 1,2)))))

Buggy python submission (verdict: Runtime Error):
import sympy

sympy.divisors(10**9)

n = int(input())
print(len(list(filter(lambda x: sympy.divisors(x) == 8, range(0, n + 1)))))

Fixed submission:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n = int(input())
print(len(list(filter(lambda x: len(make_divisors(x)) == 8, range(1, n + 1,2)))))
Buggy python submission (verdict: Runtime Error):
s = input()

a = -1
c = -1
lower = 0
for i in range(len(s))
  if s[i] == 'A':
    a = i
  if s[i] == 'C':
    c = i
  if 'a' <= s[i] <= 'z':
    lower += 1

if a == 0 and 2 <= c <= len(s) - 2 and lower == len(s) - 2:
  print('AC')
else:
  print('WA')

Fixed submission:
s = input()

a = -1
c = -1
lower = 0
for i in range(len(s)):
  if s[i] == 'A':
    a = i
  if s[i] == 'C':
    c = i
  if 'a' <= s[i] <= 'z':
    lower += 1

if a == 0 and 2 <= c <= len(s) - 2 and lower == len(s) - 2:
  print('AC')
else:
  print('WA')
Buggy python submission (verdict: Runtime Error):
x = int(input())
if x <= 3:
  print(1):
else:
  a = []
  for i in range(2, x + 1):
    j = 2
    while i ** j < x:
      a.append(i ** j)
  print(max(a))

Fixed submission:
x = int(input())
if x <= 3:
  print(1)
else:
  a = []
  for i in range(2, x + 1):
    j = 2
    while i ** j <= x:
      a.append(i ** j)
      j += 1
  print(max(a))
Buggy python submission (verdict: Runtime Error):
n, x = list(map(int, input().split()))
m = []
for _ in range(n):
  m.append(int(input()))
sort(m)

def main():
  for i in range(n):
    if sum(m[0:i+1]) > x:
      print(i)
      return
  print(n)

main()

Fixed submission:
n, x = list(map(int, input().split()))
m = []
for _ in range(n):
  m.append(int(input()))
m.sort()

def main():
  for i in range(n):
    if sum(m[0:i+1]) > x:
      print(i)
      return
  print(n)

if sum(m) > x:
  main()
else:
  print(n + (x - sum(m)) // m[0])
Buggy python submission (verdict: Runtime Error):
a,b,x=list(map(int,input()))
if a+b >= x:
  print("YES")
else:
  print("NO")

Fixed submission:
a,b,x=list(map(int,input().split()))
if a+b >= x and a <= x:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c=list(map(int input().split()))
if a+b >= c:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c=list(map(int,input().split()))
if a+b >= c:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n, a = list(map(int, input().split()))
if n % 500 <= a:
  print('Yes')
else:
  print('No')

Fixed submission:
n = int(input())
a = int(input())

if n % 500 <= a:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n, a = lsit(map(int, input().split()))

if n % 500 <= a:
  print('Yes')
else:
  print('No')

Fixed submission:
n = int(input())
a = int(input())

if n % 500 <= a:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n, a = list(map(int, input().split()))

if n % 500 <= a:
  print('Yes')
else:
  print('No')

Fixed submission:
n = int(input())
a = int(input())

if n % 500 <= a:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a, b, c, d = list(map(int, input().split()))

A = a + b
B = c + d
if A == B:
  print('Balanced')
else if A > B:
  print('Left')
else if A < B:
  print('Right')

Fixed submission:
a, b, c, d = list(map(int, input().split()))

A = a + b
B = c + d
if A == B:
  print('Balanced')
elif A > B:
  print('Left')
elif A < B:
  print('Right')
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict

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

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

av = reverse(sorted(d.values()))
ks = 0
idx = 0
while ks < k:
  ks += av[idx]
  idx += 1
print(idx)

Fixed submission:
from collections import defaultdict

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

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

av = list(sorted(d.values()))
ks = 0
idx = 0
print(sum(av[0:-k]))
Buggy python submission (verdict: Runtime Error):
x, t = list(map(int, input().split()))
print(max([0, x - t])

Fixed submission:
x, t = list(map(int, input().split()))
print(max([0, x - t]))

Buggy python submission (verdict: Runtime Error):
x, t = list(map(input().split()))
print(max([0, x - t])

Fixed submission:
x, t = list(map(int, input().split()))
print(max([0, x - t]))
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input()))

print((a - 1) * (b - 1))

Fixed submission:
a, b = list(map(int, input().split()))

print((a - 1) * (b - 1))
Buggy python submission (verdict: Runtime Error):
print(sum(sorted(list(map(int, intput().split())))[0:2]))

Fixed submission:
print(sum(sorted(list(map(int, input().split())))[0:2]))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if a < b:
  print('LESS'):
elif a > b:
  print('GREATER')
else:
  print('EQUAL')

Fixed submission:
a = int(input())
b = int(input())

if a < b:
  print('LESS')
elif a > b:
  print('GREATER')
else:
  print('EQUAL')
Buggy python submission (verdict: Runtime Error):
o = input()
e = input()
n = []
e.append(' ')
for i in range(o):
  n.append(o[i])
  n.append(e[i])
print(''.join(n).strip())

Fixed submission:
o = input()
e = input()
n = []
e += ' '
for i in range(len(o)):
  n.append(o[i])
  n.append(e[i])
print(''.join(n).strip())
Buggy python submission (verdict: Runtime Error):
a, b = input().split()

if a == b:
  print('H'):
else:
  print('D')

Fixed submission:
a, b = input().split()
if a == b:
  print('H')
else:
  print('D')
Buggy python submission (verdict: Runtime Error):
x = int(input())
s = 0
j = 0
for i in range(1..x+1):
  s += i
  j += 1
  if s >= x:
    print(j)
    break

Fixed submission:
x = int(input())
s = 0
j = 0
for i in range(1,x+1):
  s += i
  j += 1
  if s >= x:
    print(j)
    break
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
import(sys)

cnt = [0] * n
for x in a:
  a[x] += 1

ok = True
for i in range(0, n):
  if n % 2 == 1 && i % 2 == 0:
    if i == 0 && cnt[i] != 1 or cnt[i] != 2:
      ok = False
  elif n % 2 == 0 && i % 2 == 0:
    if cnt[i] != 2:
      ok = False

if not ok:
  print(0)
else:
  res = 1
  for i in range(0, n // 2):
    res *= 2
    res %= 1000000007
print(res)

Fixed submission:
import sys
n = int(input())
a = list(map(int, input().split()))


cnt = [0] * n
for x in a:
  cnt[x] += 1

ok = True
for i in range(0, n):
  if n % 2 == 1 and i % 2 == 0:
    if i == 0 and cnt[i] != 1 or i > 0 and cnt[i] != 2:
      ok = False
  elif n % 2 == 0 and i % 2 == 1:
    if cnt[i] != 2:
      ok = False

if not ok:
  print(0)
else:
  res = 1
  for i in range(0, n // 2):
    res *= 2
    res %= 1000000007
  print(res)
Buggy python submission (verdict: Runtime Error):
m = input()
x=ord(m)
if x >= 97 and x <= 122:
    print("a")
else:
    print("A"

Fixed submission:
m = input()
x = ord(m)
if x >= 97 and x <= 122:
    print("a")
else:
    print("A")
Buggy python submission (verdict: Runtime Error):
x,y =map(int,input().split())
print(x/t)

Fixed submission:
x,y =map(int,input().split())
print(x/y)
Buggy python submission (verdict: Runtime Error):
x,y = int(input().split())
print((x-1)*(y-1))

Fixed submission:
x,y =map(int,input().split())
print((x-1)*(y-1))
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <string>
#include <queue>
#include <deque>
#include <tuple>
#include <map>
#include <sstream>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define SORT(c) sort(ALL(x))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
const int INF = 1001001001;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const long double PI  = acos(-1.0L);
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
#define chmax(a,b) a = (((a)<(b))?(b):(a))
#define chmin(a,b) a = (((a)>(b))?(b):(a))

__attribute__((constructor))
void initial(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
}

signed main(){
	ll a,b,c; cin>>a>>b>>c;
	cerr << 4*a*b SP pow(c-a-b,2) << endl;
	if(c-a-b<=0) cout<<"No";
	else if(4*a*b<pow(c-a-b,2)) cout << "Yes";
	else cout << "No";

  return 0;
}


Fixed submission:
h = list(map(int, input().split()));
a = h[0]
b = h[1]
c = h[2]
if(c-a-b<=0):
  print("No")
elif(4*a*b<(c-a-b)**2):
  print("Yes")
else:
  print("No")