TnT/CodeNet4Repair huggingface dataset:
Problem:
We call a 4-digit integer with three or more consecutive same digits, such as 1118, **good**.  You are given a 4-digit integer N. Answer the question: Is N **good**?

Incorrect submission (verdict: Wrong Answer):
N=list(input())
ans=False
for i in N:
    if N.count(i)>2:
        ans=True
        break
print(ans)

Fixed, accepted submission:
N=input()
l=['000','111','222','333','444','555','666','777','888','999']
for i in l:
    if i == N[0:3] or i==N[1:len(N)]:
        print('Yes')
        exit()
print('No')
Problem:
AtCoDeer the deer has found two positive integers, a and b. Determine whether the concatenation of a and b in this order is a square number.

Incorrect submission (verdict: Wrong Answer):
import math

a, b = map(int, input().split())
if math.sqrt(a * b) % 1 == 0:
    print('Yes')
else:
    print('No')


Fixed, accepted submission:
import math

a, b = input().split()
if math.sqrt(int(a + b)) % 1 == 0:
    print('Yes')
else:
    print('No')
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())

t = n % 500 - a

if a <= 0:
  print("Yes")
else:
  print("No")

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

t = n % 500 - a

if t <= 0:
  print("Yes")
else:
  print("No")
Problem:
We will buy a product for N yen (the currency of Japan) at a shop.  If we use only 1000-yen bills to pay the price, how much change will we receive?  Assume we use the minimum number of bills required.

Incorrect submission (verdict: Wrong Answer):
N=input()
i=(int(N[0])+1)*1000
j=i-int(N)
if j==1000:
  print(0)
else:
  print(j-i)

Fixed, accepted submission:
N=input()
if len(N)>3:
    i=(int(N[:-3])+1)*1000
else:
    i=1000

j=i-int(N)

if j>999:
  print(0)
else:
  print(j)
Problem:
Takahashi has N balls. Initially, an integer A_i is written on the i-th ball.  He would like to rewrite the integer on some balls so that there are at most K different integers written on the N balls.  Find the minimum number of balls that Takahashi needs to rewrite the integers on them.

Incorrect submission (verdict: Wrong Answer):
from collections import Counter
n,k=map(int,input().split())
a=list(map(int,input().split()))
c=Counter(a).most_common()
ans=0
idx=1
while k>0:
  k-=c[-idx][1]
  ans+=c[-idx][1]
  idx+=1
print(ans)

Fixed, accepted submission:
from collections import Counter
n,k=map(int,input().split())
a=list(map(int,input().split()))
c=Counter(a).most_common()
ans=0
idx=1
m=len(c)
while m>k:
  m-=1
  ans+=c[-idx][1]
  idx+=1
print(ans)
Problem:
We call a 4-digit integer with three or more consecutive same digits, such as 1118, **good**.  You are given a 4-digit integer N. Answer the question: Is N **good**?

Incorrect submission (verdict: Wrong Answer):
n = input()
s = set(n)
print(s)
if (len(s) <= 2 and n.count(s.pop()) % 2 == 1):
  print('Yes')
else:
  print('No')


Fixed, accepted submission:
n = input()
if (n[0] * 3 in n or n[-1] * 3 in n):
  print('Yes')
else:
  print('No')
Problem:
Some number of chocolate pieces were prepared for a training camp. The camp had N participants and lasted for D days. The i-th participant (1 \leq i \leq N) ate one chocolate piece on each of the following days in the camp: the 1-st day, the (A_i + 1)-th day, the (2A_i + 1)-th day, and so on. As a result, there were X chocolate pieces remaining at the end of the camp. During the camp, nobody except the participants ate chocolate pieces.  Find the number of chocolate pieces prepared at the beginning of the camp.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
d,x = map(int, input().split())
for i in range(n):
  x += (d-1) // int(input())
print(x)

Fixed, accepted submission:
n = int(input())
d,x = map(int, input().split())
for i in range(n):
  a = (d-1) // int(input()) +1
  x += a
print(x)
Problem:
There are N participants in the CODE FESTIVAL 2016 Qualification contests. The participants are either students in Japan, students from overseas, or neither of these.  Only Japanese students or overseas students can pass the Qualification contests. The students pass when they satisfy the conditions listed below, from the top rank down. Participants who are not students cannot pass the Qualification contests.    * A Japanese student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B.   * An overseas student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B and the student ranks B-th or above among all overseas students.  A string S is assigned indicating attributes of all participants. If the i-th character of string S is `a`, this means the participant ranked i-th in the Qualification contests is a Japanese student; `b` means the participant ranked i-th is an overseas student; and `c` means the participant ranked i-th is neither of these.  Write a program that outputs for all the participants in descending rank either `Yes` if they passed the Qualification contests or `No` if they did not pass.

Incorrect submission (verdict: Wrong Answer):
n, a, b = map(int, input().split())
s = input()
print(len(s))
b_cnt = 0
a_cnt = 0
for i in range(n):
    if s[i] == "a" and (a_cnt+b_cnt) < a+b:
        a_cnt += 1
        print("Yes")
    elif s[i] == "b" and (a_cnt+b_cnt) < a+b and b_cnt < b:
        #print(b_cnt)
        b_cnt += 1
        print("Yes")
    else:
        print("No")


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

total_cnt = 0
b_cnt = 0
ans = ["No"]*n

for i in range(n):
    if total_cnt >= a+b:
        break
    if s[i] == "c":
        continue
    if s[i] == "a":
        total_cnt += 1
        ans[i] = "Yes"
    if s[i] == "b":
        b_cnt += 1
        if b_cnt <= b:
            total_cnt += 1
            ans[i] = "Yes"

for i in range(n):
    print(ans[i])
Problem:
Some number of chocolate pieces were prepared for a training camp. The camp had N participants and lasted for D days. The i-th participant (1 \leq i \leq N) ate one chocolate piece on each of the following days in the camp: the 1-st day, the (A_i + 1)-th day, the (2A_i + 1)-th day, and so on. As a result, there were X chocolate pieces remaining at the end of the camp. During the camp, nobody except the participants ate chocolate pieces.  Find the number of chocolate pieces prepared at the beginning of the camp.

Incorrect submission (verdict: Wrong Answer):
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for _ in range(N)]
ans=0
for i in range(N):
  for j in range(N):
    if 30>=A[i]*j:
      ans+=1
    else:
      break
print(ans+X)

Fixed, accepted submission:
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for _ in range(N)]
ans=0
for i in range(N):
  for j in range(D):
    if D>A[i]*j:
      ans+=1
    else:
      break
print(ans+X)
Problem:
In this problem, we use the 24-hour clock.  Takahashi gets up exactly at the time H_1 : M_1 and goes to bed exactly at the time H_2 : M_2. (See Sample Inputs below for clarity.) He has decided to study for K consecutive minutes while he is up. What is the length of the period in which he can start studying?

Incorrect submission (verdict: Wrong Answer):
h1, m1, h2, m2, k = map(int, input().split())

a = (h2*60+m2)-(h1*60+m1)

if(a>=k):
  print((h2*60+m2)-k)
else :
  print(0)

Fixed, accepted submission:
h1, m1, h2, m2, k = map(int, input().split())

a = (h2*60+m2)-(h1*60+m1)

if(a>k):
  print(a-k)
else :
  print(0)
Problem:
In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi Islands. For convenience, we will call them Island 1, Island 2, ..., Island N.  There are M kinds of regular boat services between these islands. Each service connects two islands. The i-th service connects Island a_i and Island b_i.  Cat Snuke is on Island 1 now, and wants to go to Island N. However, it turned out that there is no boat service from Island 1 to Island N, so he wants to know whether it is possible to go to Island N by using two boat services.  Help him.

Incorrect submission (verdict: Wrong Answer):
N, M = map(int, input().split())
starts = set([])
ends = set([])

for _ in range(M):
    a, b = map(int, input().split())
    if a == 1 or b  == 1:
        starts.add(a if b == 1 else b)
    if a == N or b == N:
        ends.add(a if b == N else b)
        
print(starts, ends)

ans = "POSSIBLE" if len(starts&ends)>=1 else "IMPOSSIBLE"
print(ans)

Fixed, accepted submission:
N, M = map(int, input().split())
starts = set([])
ends = set([])

for _ in range(M):
    a, b = map(int, input().split())
    if a == 1 or b  == 1:
        starts.add(a if b == 1 else b)
    if a == N or b == N:
        ends.add(a if b == N else b)

ans = "POSSIBLE" if len(starts&ends)>=1 else "IMPOSSIBLE"
print(ans)
Problem:
On a planet far, far away, M languages are spoken. They are conveniently numbered 1 through M.  For _CODE FESTIVAL 20XX_ held on this planet, N participants gathered from all over the planet.  The i-th (1≦i≦N) participant can speak K_i languages numbered L_{i,1}, L_{i,2}, ..., L_{i,{}K_i}.  Two participants A and B can _communicate_ with each other if and only if one of the following conditions is satisfied:    * There exists a language that both A and B can speak.   * There exists a participant X that both A and B can communicate with.  Determine whether all N participants can communicate with all other participants.

Incorrect submission (verdict: Wrong Answer):
class UnionFind():
  def __init__(self,n):
    self.n=n
    self.root=[-1]*(n+1)
    self.rank=[0]*(n+1)
  def FindRoot(self,x):
    if self.root[x]<0:
      return x
    else:
      self.root[x]=self.FindRoot(self.root[x])
      return self.root[x]
  def Unite(self,x,y):
    x=self.FindRoot(x)
    y=self.FindRoot(y)
    if x==y:
      return
    else:
      if self.rank[x]>self.rank[y]:
        self.root[x]+=self.root[y]
        self.root[y]=x
      elif self.rank[x]<=self.rank[y]:
        self.root[y]+=self.root[x]
        self.root[x]=y
        if self.rank[x]==self.rank[y]:
          self.rank[y]+=1
  def isSameGroup(self,x,y):
    return self.FindRoot(x)==self.FindRoot(y)
  def Count(self,x):
    return -self.root[self.FindRoot(x)]
  
n,m=map(int,input().split())
t=UnionFind(m)
for _ in range(n):
  l=list(map(int,input().split()))
  if l[0]==1:
    t.Unite(0,l[1])
  else:
    for i in range(l[0]-1):
      t.Unite(l[1],l[2+i])
s=set()
for i in range(m):
  r=t.FindRoot(i)
  if r==i:
    continue
  else:
    s.add(r)
if len(s)==1:
  print('Yes')
else:
  print('No')

Fixed, accepted submission:
class UnionFind():
  def __init__(self,n):
    self.n=n
    self.root=[-1]*(n+1)
    self.rank=[0]*(n+1)
  def FindRoot(self,x):
    if self.root[x]<0:
      return x
    else:
      self.root[x]=self.FindRoot(self.root[x])
      return self.root[x]
  def Unite(self,x,y):
    x=self.FindRoot(x)
    y=self.FindRoot(y)
    if x==y:
      return
    else:
      if self.rank[x]>self.rank[y]:
        self.root[x]+=self.root[y]
        self.root[y]=x
      elif self.rank[x]<=self.rank[y]:
        self.root[y]+=self.root[x]
        self.root[x]=y
        if self.rank[x]==self.rank[y]:
          self.rank[y]+=1
  def isSameGroup(self,x,y):
    return self.FindRoot(x)==self.FindRoot(y)
  def Count(self,x):
    return -self.root[self.FindRoot(x)]
  
n,m=map(int,input().split())
t=UnionFind(n+m)
for i in range(n):
  l=list(map(int,input().split()))
  for j in range(l[0]):
    t.Unite(i+1,n+l[1+j])
s=set()
for i in range(n):
  r=t.FindRoot(i+1)
  s.add(r)
if len(s)==1:
  print('YES')
else:
  print('NO')
Problem:
This contest, _AtCoder Beginner Contest_ , is abbreviated as _ABC_.  When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example, ABC680 is the 680th round of ABC.  What is the abbreviation for the N-th round of ABC? Write a program to output the answer.

Incorrect submission (verdict: Wrong Answer):
n=input()
print("ABC"+n[1:])

Fixed, accepted submission:
n=input()
print("ABC"+n[0:])
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):
x = map(int, input().split())
if 2 * max(x) == sum(x):
  print("Yes")
else:
  print("No")


Fixed, accepted submission:
x = [ int(i) for i in input().split()]
if 2 * max(x) == sum(x):
  print("Yes")
else:
  print("No")
Problem:
Print the K-th element of the following sequence of length 32:                1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51

Incorrect submission (verdict: Wrong Answer):
1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51

Fixed, accepted submission:
s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())

print(s[k-1])
Problem:
There are N people numbered 1 to N. Each person wears a red hat or a blue hat.  You are given a string s representing the colors of the people. Person i wears a red hat if s_i is `R`, and a blue hat if s_i is `B`.  Determine if there are more people wearing a red hat than people wearing a blue hat.

Incorrect submission (verdict: Wrong Answer):
N=int(input())
s=input().split()
y=0
v=0
for i in s:
    if i=='R':
        y+=1
    else:
        v+=1
if y>v:
    print('Yes')
else:
    print('No')

Fixed, accepted submission:
N=int(input())
s=input()
y=0
v=0
for i in s:
    if i=='R':
        y+=1
    elif i=='B':
        v+=1
if y>v:
    print('Yes')
elif v>=y:
    print('No')
Problem:
There are N children in AtCoder Kindergarten. Mr. Evi will arrange the children in a line, then give 1 candy to the first child in the line, 2 candies to the second child, ..., N candies to the N-th child. How many candies will be necessary in total?

Incorrect submission (verdict: Wrong Answer):
a=int(input())
print((1+a)*a/2)

Fixed, accepted submission:
a=int(input())
print(int((1+a)*a/2))
Problem:
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.  Extend this image vertically so that its height is doubled. That is, print a image with a height of 2H pixels and a width of W pixels where the pixel at the i-th row and j-th column is equal to C_{(i+1)/2,j} (the result of division is rounded down).

Incorrect submission (verdict: Wrong Answer):
h,w =map(int,input().split())
c =[[str(i) for i in input()] for _ in range(h)]

for i in range(2*h):
  if i <h:
    print("".join(c[i]))
  elif i >= h:
    print("".join(c[i-h]))


Fixed, accepted submission:
h,w = map(int,input().split())

for i in range(h):
    c = input()
    print(c)
    print(c)
Problem:
You have A 500-yen coins, B 100-yen coins and C 50-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are X yen in total?  Coins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.

Incorrect submission (verdict: Wrong Answer):
a_500 = int(input().split()[0])
b_100 = int(input().split()[0])
c_50 = int(input().split()[0])
x = int(input().split()[0])

all_coins = []
count = 0

for a_n in range(a_500+1):
    for b_n in range(b_100+1):
        for c_n in range(c_50+1):
            hoge = 500*a_n + 100*b_n + 50*c_50
            if hoge == x:
                count += 1

print(count)

Fixed, accepted submission:
a_500 = int(input().split()[0])
b_100 = int(input().split()[0])
c_50 = int(input().split()[0])
x = int(input().split()[0])

all_coins = []
count = 0

for a_n in range(a_500+1):
    for b_n in range(b_100+1):
        for c_n in range(c_50+1):
            total = 500*a_n + 100*b_n + 50*c_n
            if total == x:
                count += 1

print(count)
Problem:
Given is an integer sequence of length N+1: A_0, A_1, A_2, \ldots, A_N. Is there a binary tree of depth N such that, for each d = 0, 1, \ldots, N, there are exactly A_d leaves at depth d? If such a tree exists, print the maximum possible number of vertices in such a tree; otherwise, print -1.

Incorrect submission (verdict: Wrong Answer):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *A=map(int,read().split())

bound = [0]*(N+1)
bound[0] = 1

if N == 0:
  if A[0] == 1:
    print(1)
  else:
    print(-1)
  sys.exit()


for i in range(1,N+1):
  bound[i] = (bound[i-1]-A[i-1]) *2
  if bound[i] <= 0:
    print(-1)
    sys.exit()
print(bound)
cum_sum = 0 

for i in range(N,-1,-1):
  cum_sum += A[i]
  bound[i] = min(bound[i],cum_sum)
print(sum(bound))

Fixed, accepted submission:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *A=map(int,read().split())

bound = [0]*(N+1)
bound[0] = 1

if N == 0:
  if A[0] == 1:
    print(1)
  else:
    print(-1)
  sys.exit()
  


for i in range(1,N+1):
  bound[i] = (bound[i-1]-A[i-1]) *2
  if bound[i] < A[i]:
    print(-1)
    sys.exit()
    

cum_sum = 0 
for i in range(N,-1,-1):
  cum_sum += A[i]
  bound[i] = min(bound[i],cum_sum)
print(sum(bound))
Problem:
You have A 500-yen coins, B 100-yen coins and C 50-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are X yen in total?  Coins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.

Incorrect submission (verdict: Wrong Answer):
a,b,c,x=map(int,open(0))
print(sum(500*i+100*j+50*k==x for i in range(a)for j in range(b)for k in range(c)))

Fixed, accepted submission:
a,b,c,x=map(int,open(0))
print(sum(500*i+100*j+50*k==x for i in range(a+1)for j in range(b+1)for k in range(c+1)))
Problem:
Takahashi has N balls. Initially, an integer A_i is written on the i-th ball.  He would like to rewrite the integer on some balls so that there are at most K different integers written on the N balls.  Find the minimum number of balls that Takahashi needs to rewrite the integers on them.

Incorrect submission (verdict: Wrong Answer):
# encoding:utf-8
import copy
import numpy as np
import random


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

count_dic = {}

for i in range(len(a)):
    if a[i] in count_dic.keys():
        count_dic[a[i]] += 1
    else:
        count_dic[a[i]] = 1
# print(type(count_dic[1]))

print(count_dic)
count_list = sorted(count_dic.items(),key=lambda x: x[0])

ans = 0
# print(len(count_list))
while len(count_list)>k:
    # print(count_list)
    delte_tuple = count_list[-1]
    add_tuple = count_list[0]
    count_list[0] = tuple([add_tuple[0],add_tuple[1]+delte_tuple[1]])
    ans += delte_tuple[1]
    del count_list[-1]

print(ans)

Fixed, accepted submission:
# encoding:utf-8
import copy
import numpy as np
import random


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

count_dic = {}

for i in range(len(a)):
    if a[i] in count_dic.keys():
        count_dic[a[i]] += 1
    else:
        count_dic[a[i]] = 1
# print(type(count_dic[1]))

# print(count_dic)
count_list = sorted(count_dic.items(),key=lambda x: x[1],reverse=True)

ans = 0
# print(len(count_list))
while len(count_list)>k:
    # print(count_list)
    delte_tuple = count_list[-1]
    add_tuple = count_list[0]
    count_list[0] = tuple([add_tuple[0],add_tuple[1]+delte_tuple[1]])
    ans += delte_tuple[1]
    del count_list[-1]

print(ans)
Problem:
Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.

Incorrect submission (verdict: Wrong Answer):
s = []
n = int(input())
for i in range(n):
    s.append(input())
print("AC x " + str(s.count("AC")))
print("WA x " + str(s.count("WA")))
print("TlE x " + str(s.count("TLE")))
print("RE x " + str(s.count("RE")))

Fixed, accepted submission:
s = []
n = int(input())
for i in range(n):
    s.append(input())
print("AC x " + str(s.count("AC")))
print("WA x " + str(s.count("WA")))
print("TLE x " + str(s.count("TLE")))
print("RE x " + str(s.count("RE")))
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):
n = int(input())
c = input().split()

cb = c[:]
for i in range(n):
	for j in range(n-1,i,-1):
		if cb[j][1] < cb[j-1][1]:
			cb[j-1],cb[j] = cb[j],cb[j-1]
print(*cb)
print('Stable')

cs = c[:]
for i in range(n):
	m = min(range(i,n), key=lambda j: cs[j][1])
	if i != m:
		cs[i],cs[m] = cs[m],cs[i]
print(*cs)
print(('' if cb == cs else 'Not ') + 'Stable')


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

cb = c[:]
for i in range(n):
	for j in range(n-1,i,-1):
		if cb[j][1] < cb[j-1][1]:
			cb[j-1],cb[j] = cb[j],cb[j-1]
print(*cb)
print('Stable')

cs = c[:]
for i in range(n):
	m = min(range(i,n), key=lambda j: cs[j][1])
	if i != m:
		cs[i],cs[m] = cs[m],cs[i]
print(*cs)
print('Stable' if cb == cs else 'Not stable')
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):
A, B, C = map(int, input().split())
if A*B*C == 5*5*7:
  print("Yes")
else:
  print("No")

Fixed, accepted submission:
A, B, C = map(int, input().split())
if A*B*C == 5*5*7 and A >= 5 and B >= 5 and C >= 5:
  print("YES")
else:
  print("NO")