TnT/CodeNet4Repair huggingface dataset:
Problem:
You are given two integers A and B as the input. Output the value of A + B.  However, if A + B is 10 or greater, output `error` instead.

Incorrect submission (verdict: Wrong Answer):
S = input()
print(["no", "yes"][len(set(S)) == len(S)])

Fixed, accepted submission:
A, B = map(int, input().split())
print(["error", A+B][A+B < 10])
Problem:
Snuke built an online judge to hold a programming contest.  When a program is submitted to the judge, the judge returns a verdict, which is a two-character string that appears in the string S as a contiguous substring. (The judge can return any two-character substring of S.)  Determine whether the judge can return the string `AC` as the verdict to a program.

Incorrect submission (verdict: Wrong Answer):
s = list(input())
if 'AC' in s:
    print('Yes')
else:
    print('No')

Fixed, accepted submission:
s = input()
if 'AC' in s:
    print('Yes')
else:
    print('No')
Problem:
Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has 3 keys on it: the `0` key, the `1` key and the backspace key.  To begin with, he is using a plain text editor with this keyboard. This editor always displays one string (possibly empty). Just after the editor is launched, this string is empty. When each key on the keyboard is pressed, the following changes occur to the string:    * The `0` key: a letter `0` will be inserted to the right of the string.   * The `1` key: a letter `1` will be inserted to the right of the string.   * The backspace key: if the string is empty, nothing happens. Otherwise, the rightmost letter of the string is deleted.  Sig has launched the editor, and pressed these keys several times. You are given a string s, which is a record of his keystrokes in order. In this string, the letter `0` stands for the `0` key, the letter `1` stands for the `1` key and the letter `B` stands for the backspace key. What string is displayed in the editor now?

Incorrect submission (verdict: Wrong Answer):
print(input().replace('B', '\b'))

Fixed, accepted submission:
s=list(reversed(input()))
ans=""
cnt=0
for c in s:
    if c == 'B':
        cnt += 1
    elif cnt > 0:
        cnt -= 1
    else:
        ans += c
print(''.join(reversed(ans)))
Problem:
There are N positive integers written on a blackboard: A_1, ..., A_N.  Snuke can perform the following operation when all integers on the blackboard are even:    * Replace each integer X on the blackboard by X divided by 2.  Find the maximum possible number of operations that Snuke can perform.

Incorrect submission (verdict: Time Limit Exceeded):
#coding:utf-8

n = int(input())
nums = list(map(int,input().split(' ')))

cnt = 0
while True:
  for num in nums:
    if num % 2 != 0:
      break
    else:
      continue
    break
  else:
    cnt += 1

Fixed, accepted submission:
#coding:utf-8

n = int(input())
nums = list(map(int,input().split(' ')))

def calc():
  cnt = 0
  while True:
    for i in range(len(nums)):
      num = nums[i]
      if num % 2 == 0 and num != 0:
        nums[i] = num / 2
      else:
        return cnt
    else:
      cnt += 1

print(calc())
Problem:
There are N empty boxes arranged in a row from left to right. The integer i is written on the i-th box from the left (1 \leq i \leq N).  For each of these boxes, Snuke can choose either to put a ball in it or to put nothing in it.  We say a set of choices to put a ball or not in the boxes is good when the following condition is satisfied:    * For every integer i between 1 and N (inclusive), the total number of balls contained in the boxes with multiples of i written on them is congruent to a_i modulo 2.  Does there exist a good set of choices? If the answer is yes, find one good set of choices.

Incorrect submission (verdict: Wrong Answer):
from collections import deque
n =int(input())
a = [0]+list(map(int, input().split()))
d = deque()
cnt=0
for i in range(n,0,-1):    
  for j in range(i,n+1,i):
    if a[j]==0:
      continue
    cnt+=1
  b = cnt%2
  a[i] = b
  if b == 1:
    d.appendleft(i)
  cnt = 0
if len(d) == 0:
  print(0)
else:
  print(' '.join(map(str,d)))

Fixed, accepted submission:
from collections import deque
n =int(input())
a = [0]+list(map(int, input().split()))
d = deque()
cnt=0
for i in range(n,0,-1):    
  for j in range(i,n+1,i):
    if a[j]==0:
      continue
    cnt+=1
  b = cnt%2
  a[i] = b
  if b == 1:
    d.appendleft(i)
  cnt = 0
print(len(d))
print(' '.join(map(str,d)))
Problem:
Snuke lives at position x on a number line. On this line, there are two stores A and B, respectively at position a and b, that offer food for delivery.  Snuke decided to get food delivery from the closer of stores A and B. Find out which store is closer to Snuke's residence.  Here, the distance between two points s and t on a number line is represented by |s-t|.

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int,input().split())

print('B' if abs(a-c) > abs(b-c) else 'A')

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

print('B' if abs(a-x) > abs(b-x) else 'A')
Problem:
Write a program which reads two integers a and b, and calculates the following values:    * a ÷ b: d (in integer)   * remainder of a ÷ b: r (in integer)   * a ÷ b: f (in real number)

Incorrect submission (verdict: Wrong Answer):
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print(d, r, f)


Fixed, accepted submission:
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print(d, r, '{:.5f}'.format(f))
Problem:
Given is an integer sequence D_1,...,D_N of N elements. Find the number, modulo 998244353, of trees with N vertices numbered 1 to N that satisfy the following condition:    * For every integer i from 1 to N, the distance between Vertex 1 and Vertex i is D_i.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
array = list(map(int, input().split()))
ans = 1
for i in range(N):
    ans *= array[i]
print(ans)

Fixed, accepted submission:
N = int(input())
array = list(map(int, input().split()))
if array[0] != 0:
    print(0)
    exit()
array.sort()
if 1 in array and len(set(array[1:])) == 1:
    print(1)
    exit()
if not (2 in array):
    print(0)
    exit()
if 0 in array[1:]:
    print(0)
    exit()
index = array.index(2)
count = 1
count_old = array.count(1)
ans = 1
first = array[index]
for i in range(index,N-1):
    if first != array[i+1]:
        if first != array[i+1] - 1:
            print(0)
            exit()
        ans *= count_old ** count
        count_old = count
        count = 1
    else:
        count += 1
    first = array[i+1]
    ans %= 998244353
ans *= count_old ** count
ans %= 998244353
print(ans)
Problem:
AtCoder Mart sells 1000000 of each of the six items below:    * Riceballs, priced at 100 yen (the currency of Japan) each   * Sandwiches, priced at 101 yen each   * Cookies, priced at 102 yen each   * Cakes, priced at 103 yen each   * Candies, priced at 104 yen each   * Computers, priced at 105 yen each  Takahashi wants to buy some of them that cost exactly X yen in total. Determine whether this is possible.   (Ignore consumption tax.)

Incorrect submission (verdict: Wrong Answer):
n = int(input())

cent = n//100
under_cent = n%100

print(cent)
print(under_cent)

if under_cent > cent*5:
  print(0)
else:
  print(1)

Fixed, accepted submission:
n = int(input())

cent = n//100
under_cent = n%100

if under_cent > cent*5:
  print(0)
else:
  print(1)
Problem:
An integer X is called a Harshad number if X is divisible by f(X), where f(X) is the sum of the digits in X when written in base 10.  Given an integer N, determine whether it is a Harshad number.

Incorrect submission (verdict: Wrong Answer):
num = int(input())

fx = 0
for i in str(num):
    fx += int(i)

print("YES" if num % fx == 0 else "NO")

Fixed, accepted submission:
num = int(input())

fx = 0
for i in str(num):
    fx += int(i)

print("Yes" if num % fx == 0 else "No")
Problem:
AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.

Incorrect submission (verdict: Wrong Answer):
N = int(input().rstrip())
t = [0 for _ in range(N+1)]
x = [0 for _ in range(N+1)]
y = [0 for _ in range(N+1)]

for i in range(1, N+1):
    t[i], x[i], y[i] = [int(s) for s in input().rstrip().split()]

judge = []
for i in range(N):
    diff_t = t[i+1] - t[i]
    diff_x = x[i+1] - x[i]
    if diff_t >= diff_x and (diff_t - diff_x ) % 2 == 0:
        judge.append(True)
    else:
        judge.append(False)

if all(judge):
    print('Yes')
else:
    print('No')

Fixed, accepted submission:
N = int(input().rstrip())
t = [0 for _ in range(N+1)]
x = [0 for _ in range(N+1)]
y = [0 for _ in range(N+1)]

for i in range(1, N+1):
    t[i], x[i], y[i] = [int(s) for s in input().rstrip().split()]

judge = []
for i in range(N):
    diff_t = t[i+1] - t[i]
    diff_x = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i])
    if diff_t >= diff_x and (diff_t - diff_x ) % 2 == 0:
        judge.append(True)
    else:
        judge.append(False)

if all(judge):
    print('Yes')
else:
    print('No')
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-
a,b,c = input().split()

a = int(a)
b = int(b)
c = int(c)

if a+b+c != 17:
  print('No')
else:
  if (a == 5 and b == 5) or ( a ==5 and c == 5) or (b ==5 and c == 5):
    print('Yes')
  else:
    print('No')

Fixed, accepted submission:
# -*- coding: utf-8 -*-
a = input().split()

a.sort()

b = ['5', '5', '7']

if a == b:
  print('YES')
else:
  print('NO')
Problem:
You went shopping to buy cakes and donuts with X yen (the currency of Japan).  First, you bought one cake for A yen at a cake shop. Then, you bought as many donuts as possible for B yen each, at a donut shop.  How much do you have left after shopping?

Incorrect submission (verdict: Wrong Answer):
x=int(input())
a=int(input())
b=int(input())
x-=a
while x>=0:
  x-=b
print(x)

Fixed, accepted submission:
x=int(input())
a=int(input())
b=int(input())
x-=a
while x>=0:
  x-=b
print(x+b)
Problem:
A group of people played a game. All players had distinct scores, which are positive integers.  Takahashi knows N facts on the players' scores. The i-th fact is as follows: the A_i-th highest score among the players is B_i.  Find the maximum possible number of players in the game.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
AB = [tuple(map(int, input().split())) for _ in range(N)]
max_A = sorted(AB)[-1]
print(max_A[0] * max_A[1])


Fixed, accepted submission:
N = int(input())
a, b = [], []
for i in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
print(max(a)+min(b))
Problem:
As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below:    * A consists of integers between X and Y (inclusive).   * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i.  Find the maximum possible length of the sequence.

Incorrect submission (verdict: Wrong Answer):
x,y=map(int,input().split())
i=1
while x<=y : 
   i+=1
   x=2*x
    
print(i)

Fixed, accepted submission:
x,y=map(int,input().split())
i=0
while x<=y : 
   i+=1
   x=2*x
    
print(i)
Problem:
Let's arrange a deck of cards. There are totally 36 cards of 4 suits(S, H, C, D) and 9 values (1, 2, ... 9). For example, 'eight of heart' is represented by H8 and 'one of diamonds' is represented by D1.  Your task is to write a program which sorts a given set of cards in ascending order by their values using the Bubble Sort algorithms and the Selection Sort algorithm respectively. These algorithms should be based on the following pseudocode:                 BubbleSort(C) 1 for i = 0 to C.length-1 2     for j = C.length-1 downto i+1 3         if C[j].value < C[j-1].value 4             swap C[j] and C[j-1]                 SelectionSort(C) 1 for i = 0 to C.length-1 2     mini = i 3     for j = i to C.length-1 4         if C[j].value < C[mini].value 5             mini = j 6     swap C[i] and C[mini]   Note that, indices for array elements are based on 0-origin.  For each algorithm, report the stability of the output for the given input (instance). Here, 'stability of the output' means that: cards with the same value appear in the output in the same order as they do in the input (instance).

Incorrect submission (verdict: Wrong Answer):
def buble(n,x,count):
    for i in range(1,n + 1):
        for j in range(1,i):
            if int(x[i - j][1]) < int(x[i - j - 1][1]):
                x[i - j],x[i - j - 1] = x[i - j - 1],x[i - j]
                count += 1  
    print (" ".join(x))
    print ("Stable")
    
def delection(n,x,flag):
    
    for i in range(n - 1):
        minx = i
        for j in range(i + 1,n):
            if x[j][1] == x[i][1]:
                flag = 1
            if x[j][1] < x[minx][1]:
                minx = j
        
        if not i == minx:
            x[i],x[minx]=x[minx],x[i]
            
    print (" ".join(x))
    if flag == 1:
        print ("Stable")
    else:
        print ("Not stable")
    
n = int(input())
x = list(map(str,input().split()))
y = x
count = 0
flag = 0
buble(n,x,count)
delection(n,y,flag)

Fixed, accepted submission:
n = int(input())
a = input().strip().split()

b = a[:]
for i in range(n):
    for j in range(n-1,i,-1):
        if b[j][1] < b[j-1][1]:
            b[j],b[j-1] = b[j-1],b[j]
print(' '.join(b))
print('Stable')
#Selection sort
for i in range(n):
    minj = i
    for j in range(i,n):
        if a[j][1] < a[minj][1]:
            minj = j
    a[i],a[minj] = a[minj],a[i]
print(' '.join(a))
print('Stable' if b == a else 'Not stable')
Problem:
A balance scale tips to the left if L>R, where L is the total weight of the masses on the left pan and R is the total weight of the masses on the right pan. Similarly, it balances if L=R, and tips to the right if L<R.  Takahashi placed a mass of weight A and a mass of weight B on the left pan of a balance scale, and placed a mass of weight C and a mass of weight D on the right pan.  Print `Left` if the balance scale tips to the left; print `Balanced` if it balances; print `Right` if it tips to the right.

Incorrect submission (verdict: Wrong Answer):
a,b,c,d=map(int, input().split())
if a+b > c+d:
 print("Left")
if a+b < c+d:
 print("Right")
else: 
 print("Balnced")

Fixed, accepted submission:
a,b,c,d=map(int, input().split())
if a+b > c+d:
 print("Left")
elif a+b < c+d:
 print("Right")
else: 
 print("Balanced")
Problem:
10^{10^{10}} participants, including Takahashi, competed in two programming contests. In each contest, all participants had distinct ranks from first through 10^{10^{10}}-th.  The _score_ of a participant is the product of his/her ranks in the two contests.  Process the following Q queries:    * In the i-th query, you are given two positive integers A_i and B_i. Assuming that Takahashi was ranked A_i-th in the first contest and B_i-th in the second contest, find the maximum possible number of participants whose scores are smaller than Takahashi's.

Incorrect submission (verdict: Wrong Answer):
q=int(input())
ab=[list(map(int,input().split())) for _ in range(q)]
for a,b in ab:
    if a>b:a,b=b,a
    if a==b:
        print(2*a-2)
    elif a+1==b:
        print(2*a-2)
    else:
        c=int((a*b)**0.5)
        if c*(c+1)>=a*b:
            print(2*c-2)
        elif c**2<a*b:
            print(2*c-1)



Fixed, accepted submission:
q=int(input())
ab=[list(map(int,input().split())) for _ in range(q)]
from math import floor
for a,b in ab:
    
    
    
    if a==b:
        print(2*a-2)
    else:
        
        
        t=floor((a*b)**0.5)
        # (1,2*t-1),(2,2*t-2),(3,(a*b-1)//3),...,(t-1,(a*b-1)//(t-1))
        if t*t>=a*b: 
            
            print(2*t-3)
        elif t*(t+1)>=a*b: 
            
            print(2*t-2)
        else:
            
            print(2*t-1)
Problem:
Two students of AtCoder Kindergarten are fighting over candy packs.  There are three candy packs, each of which contains a, b, and c candies, respectively.  Teacher Evi is trying to distribute the packs between the two students so that each student gets the same number of candies. Determine whether it is possible.  Note that Evi cannot take candies out of the packs, and the whole contents of each pack must be given to one of the students.

Incorrect submission (verdict: Wrong Answer):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def S(): return input()


def main():
    a = LI()
    if sum(a) % 3 == 0:
        return 'YES'
    return 'NO'


print(main())


Fixed, accepted submission:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def S(): return input()


def main():
    a = LI()
    if sum(a)  == max(a)*2:
        return 'Yes'
    return 'No'


print(main())
Problem:
E869120 has A 1-yen coins and infinitely many 500-yen coins.   Determine if he can pay exactly N yen using only these coins.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = int(input())
if n % 500 <= a:
    print("YES")
else:
    print("NO")

Fixed, accepted submission:
n = int(input())
a = int(input())
if n % 500 <= a:
    print("Yes")
else:
    print("No")
Problem:
You are given three integers A, B and C. Determine whether C is not less than A and not greater than B.

Incorrect submission (verdict: Wrong Answer):
a, b, c = [int(s) for s in input().split()]
if c >= a and c <= b:
    print("YES")
else:
    print("NO")


Fixed, accepted submission:
a, b, c = [int(s) for s in input().split()]
if c >= a and c <= b:
    print("Yes")
else:
    print("No")
Problem:
The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.  You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.

Incorrect submission (verdict: Wrong Answer):
s = input()
lis = [s[:1],str(len(s)),s[-1]]
print("".join(lis))


Fixed, accepted submission:
s = input()
lis = [s[:1],str(len(s)-2),s[-1]]
print("".join(lis))
Problem:
Write a program which calculates the cube of a given integer x.

Incorrect submission (verdict: Wrong Answer):
x = 3
x**3


Fixed, accepted submission:
x = input()
x = int(x)
print(x**3)
Problem:
AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.

Incorrect submission (verdict: Wrong Answer):
n = int(input())

p = [None]*n

for i in range(n):
    p[i] = list(map(int,input().split()))

plan = [[0,0,0]]
plan.extend(p)

for i in range(n):
    diff = [plan[i+1][k] - plan[i][k] for k in range(len(plan[0]))]
    if abs(diff[1])+abs(diff[2])>diff[0]:
        print('No')
        break
    elif diff[0]-(abs(diff[1])+abs(diff[2]))%2==1:
        print('No')
        break
    elif i==n-1:
        print('YES')
    


Fixed, accepted submission:
n = int(input())

p = [None]*n

for i in range(n):
    p[i] = list(map(int,input().split()))

plan = [[0,0,0]]
plan.extend(p)

for i in range(n):
    diff = [plan[i+1][k] - plan[i][k] for k in range(len(plan[0]))]
    if (abs(diff[1])+abs(diff[2]))>diff[0] or (diff[0]-(abs(diff[1])+abs(diff[2])))%2==1:
        print('No')
        exit()

print('Yes')
Problem:
Determine if we can choose K different integers between 1 and N (inclusive) so that no two of them differ by 1.

Incorrect submission (verdict: Wrong Answer):
n,k=map(int,input().split())
print("Yes" if (n+1)/2>=k else "No")

Fixed, accepted submission:
n,k=map(int,input().split())
print("YES" if (n+1)/2>=k else "NO")
Problem:
There is a hotel with the following accommodation fee:    * X yen (the currency of Japan) per night, for the first K nights   * Y yen per night, for the (K+1)-th and subsequent nights  Tak is staying at this hotel for N consecutive nights. Find his total accommodation fee.

Incorrect submission (verdict: Wrong Answer):
x=[]
for i in range(0,4):
  x.append(int(input()))
s=0
for j in range(0,x[0]):
  if j+1<x[1]:
    s+=x[2]
  else:
    s+=x[3]
    
print(s)

Fixed, accepted submission:
x=[]
for i in range(0,4):
  x.append(int(input()))
s=0
for j in range(0,x[0]):
  if j+1<=x[1]:
    s+=x[2]
  else:
    s+=x[3]
    
print(s)
Problem:
加減乗除の計算をする電卓プログラムを作りなさい．  入力データの各行には数と記号 +, -, *, /, = のどれか1つが交互に書いてある． １行目は数である． 演算 +, -, *, / の優先順位（乗除算 *, / を加減算 +, - よりも先に計算すること）は考えず，入力の順序で計算し，= の行になったら，計算結果を出力する． 入力データの数値は108以下の正の整数とする． 計算中および計算結果は，0または負の数になることもあるが -108〜108 の範囲は超えない． 割り算は切り捨てとする． したがって，100/3*3= は 99 になる．  出力ファイルにおいては， 出力の最後の行にも改行コードを入れること．

Incorrect submission (verdict: Wrong Answer):
# AOJ 0588: Simple Calculator
# Python3 2018.6.30 bal4u

a = int(input())
while True:
	op = input().strip()
	print(op)
	if op == '=': break
	b = int(input()) 
	if      op == '+': a += b
	elif s == '-': a -= b
	elif s == '*': a *= b
	else:          a //= b
print(a)


Fixed, accepted submission:
# AOJ 0588: Simple Calculator
# Python3 2018.6.30 bal4u

a = int(input())
while True:
	op = input().strip()
	if op == '=': break
	b = int(input()) 
	if   op == '+': a += b
	elif op == '-': a -= b
	elif op == '*': a *= b
	else:          a //= b
print(a)
Problem:
You are given two positive integers a and b. Let x be the average of a and b. Print x rounded up to the nearest integer.

Incorrect submission (verdict: Wrong Answer):
import numpy as np
from math import modf

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

mean = np.mean(l)

decimal, integer = modf(mean)
j = decimal * 10

if j >= 5 :
    res = integer + 1
else :
    res = integer

print(res)


Fixed, accepted submission:
import numpy as np

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

mean    = np.mean(l)
integer = int(mean)
decimal = mean - integer

j = decimal * 10

if j >= 5 :
    res = integer + 1
else :
    res = integer

print(res)
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):

l,m,n = map(int,input().split())
cnt =0
if l == 5:
  cnt += 1
if m == 7:
  cnt += 1
if l == 5:
  cnt += 1
if cnt == 3:
  print("YES")
else:
  print("NO")


Fixed, accepted submission:

l,m,n = map(int,input().split())
cnt = l+m+n 

if cnt == 17:
  print("YES")
else:
  print("NO")