TnT/CodeNet4Repair huggingface dataset:
Problem:
AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.  Since he is forgetful, he might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.

Incorrect submission (verdict: Wrong Answer):
A, B, C = map(int, input().split())
if A==B and B==C :
  print(1)

elif A==B and B!=C :
  print(2)

elif B==C and B!=A :
  print(2)

elif A==C and A!=B :
  print(2)

else :
  print(1)

Fixed, accepted submission:
A = input().split(" ")

a = A[0]
b = A[1]
c = A[2]

if a == b and b == c: print(1)
elif a == b or a == c and b != c : print(2)
elif b == c and a != b : print(2)
else : print(3)
Problem:
You are given a string S consisting of lowercase English letters. Another string T is initially empty. Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:    * Append one of the following at the end of T: `dream`, `dreamer`, `erase` and `eraser`.

Incorrect submission (verdict: Wrong Answer):
s=input()
ind =0
len_s=len(s)
s = s+ "zzzzzzzzzz"

A = "dreamer"
B= "dream"
C= "erase"
D="eraser"

flag =True
while(1):
    if(s[ind] =="d"):
        if(s[ind + 7] !="a"):
            if(s[ind:ind+7]!=A):
                flag = False
                break
            else:
                ind+=7
        else:
            if(s[ind:ind+5] !=B):
                flag = False
                break
            else:
                ind+=5
    elif(s[ind]=="e"):
        if(s[ind+5]=="r"):
            if(s[ind:ind+6]!=D):
                flag = False
                break
            else:
                ind+=6

        else:
            if(s[ind:ind +5] !=C):
                flag =False
                break
            else:
                ind+=5
    else:
        flag=False
        break
    if(ind == len_s):
        break
    if(ind > len(s)):
        flag=False
        break
if(flag):
    print("YES")
else:
    print("NO")



Fixed, accepted submission:
s=input()
ind =0
len_s=len(s)
s = s+ "AAAAAAAAA"

A = "dreamer"
B= "dream"
C= "erase"
D="eraser"

flag =True
while(1):
    if(s[ind] =="d"):
        if(s[ind + 5] =="d"):
            if(s[ind:ind+5]!=B):
                flag = False
                break
            else:
                ind+=5
        else:
            if(s[ind+5]!='e' and s[ind+5]!='A'):
                flag=False
                break
            if(s[ind+7] == "a" or ind + 7 >len_s):
                if(s[ind:ind+5]!=B):
                    flag = False
                    break
                else:
                    ind+=5

            else:
                if(s[ind:ind+7] !=A):
                    flag = False
                    break
                else:
                    ind+=7
    elif(s[ind]=="e"):
        if(s[ind+5]=="r"):
            if(s[ind:ind+6]!=D):
                flag = False
                break
            else:
                ind+=6

        else:
            if(s[ind:ind +5] !=C):
                flag =False
                break
            else:
                ind+=5
    else:
        flag=False
        break
    if(ind == len_s):
        break
    if(ind > len_s):
        flag=False
        break
if(flag):
    print("YES")
else:
    print("NO")
Problem:
Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles _beautiful_ if the tops of the poles lie on the same line, that is, b-a = c-b.  Determine whether the arrangement of the poles is beautiful.

Incorrect submission (verdict: Wrong Answer):
a, b, c =map(int,input().split())
if b-a == c-b:
    print("Yes")
else:
    print("No")


Fixed, accepted submission:
a, b, c =map(int,input().split())
if b-a == c-b:
    print("YES")
else:
    print("NO")
Problem:
Write a program of the Selection Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:                 SelectionSort(A) 1 for i = 0 to A.length-1 2     mini = i 3     for j = i to A.length-1 4         if A[j] < A[mini] 5             mini = j 6     swap A[i] and A[mini]   Note that, indices for array elements are based on 0-origin.  Your program should also print the number of swap operations defined in line 6 of the pseudocode in the case where i ≠ mini.

Incorrect submission (verdict: Wrong Answer):
#!/usr/bin/env python
# encoding: utf-8


class Solution:
    @staticmethod
    def selection_sort():
        # write your code here
        array_length = int(input())
        unsorted_array = [int(x) for x in input().split()]

        count = 0
        for i in range(array_length):
            min_j = i
            for j in range(i, array_length):
                if unsorted_array[j] < unsorted_array[min_j]:
                    min_j = j
            unsorted_array[i], unsorted_array[min_j] = unsorted_array[min_j], unsorted_array[i]
            count += 1

        print(" ".join(map(str, unsorted_array)))
        print(str(count))


if __name__ == '__main__':
    solution = Solution()
    solution.selection_sort()

Fixed, accepted submission:
#!/usr/bin/env python
# encoding: utf-8


class Solution:
    @staticmethod
    def selection_sort():
        # write your code here
        array_length = int(input())
        unsorted_array = [int(x) for x in input().split()]

        count = 0
        for i in range(array_length):
            min_j = i
            for j in range(i, array_length):
                if unsorted_array[j] < unsorted_array[min_j]:
                    min_j = j
            unsorted_array[i], unsorted_array[min_j] = unsorted_array[min_j], unsorted_array[i]
            if i != min_j:
                count += 1

        print(" ".join(map(str, unsorted_array)))
        print(str(count))


if __name__ == '__main__':
    solution = Solution()
    solution.selection_sort()
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())
data = list(input())

for i in range(len(data)):
    if data[i] == "a":
        if i <= a + b:
            print("Yes")
        else:
            print("No")
    elif data[i] == "b":
        if i <= a + b and i <= b:
            print("Yes")
        else:
            print("No")
    else:
        print("No")


Fixed, accepted submission:

n, a, b=map(int,input().split())
for s in input():
    if s=='a':
        if a+b>0:
            print('Yes')
            a-=1
        else:
            print('No')
    elif s=='b'and a+b>0 and b>0:
        print('Yes')
        b-=1
    else:
        print('No')
Problem:
You are given a trapezoid. The lengths of its upper base, lower base, and height are a, b, and h, respectively.    An example of a trapezoid  Find the area of this trapezoid.

Incorrect submission (verdict: Wrong Answer):
a = int(input())
b = int(input())
h = int(input())

print(((a+b)*h)/2)

Fixed, accepted submission:
a = int(input())
b = int(input())
h = int(input())

print(int(((a+b)*h)/2))
Problem:
You are given two integers A and B. Find the largest value among A+B, A-B and A \times B.

Incorrect submission (verdict: Wrong Answer):
a,b = [int(x) for x in input().split()]
ans = max([a+b, a-b, a*b])

Fixed, accepted submission:
a,b = [int(x) for x in input().split()]
ans = max([a+b, a-b, a*b])
print(ans)
Problem:
Let's first write a program to calculate the score from a pair of input and output. You can know the total score by submitting your solution, or an official program to calculate a score is often provided for local evaluation as in this contest. Nevertheless, writing a score calculator by yourself is still useful to check your understanding of the problem specification. Moreover, the source code of the score calculator can often be reused for solving the problem or debugging your solution. So it is worthwhile to write a score calculator unless it is very complicated.

Incorrect submission (verdict: Wrong Answer):
d=int(input())
a=[]
for x in range(d+1):
  b=list(map(int,input().split()))
  a.append(b)
  
  

print(a[1][1])
sum1=sum(a[0][1:d])

ans=[0]*d

for n in range(d):
  ans[n]=(a[n+1][0])
  ans[n]=int(int(ans[n])-(sum1))
  try:
    ans[n]=ans[n]+ans[n-1]
  except:
    True
    
for y in range(d):
  print(ans[y])

  

Fixed, accepted submission:
d=int(input())
a=[]
for x in range(d+1):
  b=list(map(int,input().split()))
  a.append(b)
nittei=[]
for x in range(d):
  nittei.append(int(input()))
  

sum1=sum(a[0][0:26])
ans=[0]*d
humann=a[0]*d
humann=humann+[0]*26



for n in range(d):
  date=nittei[n]
  ans[n]=(a[n+1][date-1])
  try:
    for z in range(26):
      humann[n*26+z]=int(humann[(n-1)*26+z])+int(humann[n*26+z])
  except:
    True
  humann[n*26+date-1]=0
  sum2=sum(humann[n*26+0:n*26+26])
  ans[n]=int(ans[n]) - int(sum2)
  
  
  try:
    ans[n]=ans[n]+ans[n-1]
  except:
    True
    
for y in range(d):
  print(ans[y])
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):
#!/usr/bin/python
# -*- Coding: utf-8 -*-

n = int(input())

if n > 1000:
    print(n%1000)
else:
    print(n)


Fixed, accepted submission:
#!/usr/bin/python
# -*- Coding: utf-8 -*-

n = int(input())

if n % 1000 == 0:
    print(0)
elif n > 1000:
    a = (n//1000 + 1)*1000
    print(a - n)
else:
    print(1000 - n)
Problem:
We say that a odd number N is _similar to 2017_ when both N and (N+1)/2 are prime.  You are given Q queries.  In the i-th query, given two odd numbers l_i and r_i, find the number of odd numbers x similar to 2017 such that l_i ≤ x ≤ r_i.

Incorrect submission (verdict: Wrong Answer):
q=int(input())
lr=[tuple(map(int,input().split())) for _ in range(q)]

def main():
  n=10**5
  ansl=[]
  sieve=[1-i%2 for i in range(n+1)]
  sieve[0]=0
  for i in range(3,n,2):
    if sieve[i]:
      sieve[2*i::i]=[0 for _ in range(2*i,n+1,i)]
  ans=[0]*(n+1)
  for i in range(3,n):
    if sieve[i]==1 and sieve[(i+1)//2]==1:
      ans[i]=ans[i-1]+1
    else:
      ans[i]=ans[i-1]

  for e in lr:
    print(ans[e[1]]-ans[e[0]-1])

if __name__=='__main__':
  main()


Fixed, accepted submission:
import sys

read=sys.stdin.read

def main():
  q,*lr=map(int,read().split())
  n=10**5
  ansl=[]
  sieve=[1]*(n+1)
  sieve[0],sieve[1]=0,0
  for i in range(2,n):
    if sieve[i]:
      sieve[2*i::i]=[0 for _ in range(2*i,n+1,i)]
  ans=[0]*(n+1)
  for i in range(3,n):
    if sieve[i]==1 and sieve[(i+1)//2]==1:
      ans[i]=ans[i-1]+1
    else:
      ans[i]=ans[i-1]
  for l,r in zip(*[iter(lr)]*2):
    print(ans[r]-ans[l-1])

if __name__=='__main__':
  main()
Problem:
Find the largest square number not exceeding N. Here, a _square number_ is an integer that can be represented as the square of an integer.

Incorrect submission (verdict: Wrong Answer):
import math
n = int(input())
print(math.floor(math.sqrt(n)))


Fixed, accepted submission:
import math
print(pow(math.floor(math.sqrt(int(input()))), 2))
Problem:
There are four towns, numbered 1,2,3 and 4. Also, there are three roads. The i-th road connects different towns a_i and b_i bidirectionally. No two roads connect the same pair of towns. Other than these roads, there is no way to travel between these towns, but any town can be reached from any other town using these roads.  Determine if we can visit all the towns by traversing each of the roads exactly once.

Incorrect submission (verdict: Wrong Answer):
L = [set(map(int,input().split())) for i in range(3)]
L += [set([1,0]),set([2,0]),set([3,0]),set([4,0])]
import copy
def dfs(left_towns, current_town):
    if len(left_towns) == 0:
        return 1
    
    ret = 0
    for t in left_towns:
        if set([t,current_town]) in L:
            new_left_towns = copy.deepcopy(left_towns)
            new_left_towns.remove(t)
            ret += dfs(new_left_towns, t)
    
    if ret>0:
        return 1
    else:
        return 0

ans = 'Yes' if dfs([1,2,3,4],0)>0 else 'No'
print(ans)


Fixed, accepted submission:
L = [set(map(int,input().split())) for i in range(3)]
L += [set([1,0]),set([2,0]),set([3,0]),set([4,0])]
import copy
def dfs(left_towns, current_town):
    if len(left_towns) == 0:
        return 1
    
    ret = 0
    for t in left_towns:
        if set([t,current_town]) in L:
            new_left_towns = copy.deepcopy(left_towns)
            new_left_towns.remove(t)
            ret += dfs(new_left_towns, t)
    
    if ret>0:
        return 1
    else:
        return 0

ans = 'YES' if dfs([1,2,3,4],0)>0 else 'NO'
print(ans)
Problem:
The commonly used bills in Japan are 10000-yen, 5000-yen and 1000-yen bills. Below, the word "bill" refers to only these.  According to Aohashi, he received an otoshidama (New Year money gift) envelope from his grandfather that contained N bills for a total of Y yen, but he may be lying. Determine whether such a situation is possible, and if it is, find a possible set of bills contained in the envelope. Assume that his grandfather is rich enough, and the envelope was large enough.

Incorrect submission (verdict: Wrong Answer):
N , Y = map(int, input().split())
ans = []
for i in range(N):
    for j in range(N):
        k = N - i - j
        if k >= 0:
            num = i*10000 + j*5000 + (N-i-j)*1000
            if num == Y:
                ans.append([i, j, (N-i-j)])

if len(ans) == 0:
    ans = [-1, -1, -1]
    
print(" ".join(map(str,ans)))

Fixed, accepted submission:
N , Y = map(int, input().split())
ans = []
for i in range(N+1):
    for j in range(N+1):
        k = N - i - j
        if k >= 0:
            num = i*10000 + j*5000 + k*1000
            if num == Y:
                ans = [i, j, k]

if len(ans) == 0:
    ans = [-1, -1, -1]
    
print(" ".join(map(str,ans)))
Problem:
The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen `-`, and the other characters are digits from `0` through `9`.  You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.

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

if s[a+1] == "-":
    s2 = s[:a+1] + s[a+2:]
    for i in range(a+b):
        if s[i] not in range(10):
            print("No")
            break
    else:
        print("Yes")

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

if s[:a].isdecimal() and s[a]=="-" and s[a+1:].isdecimal():
    print("Yes")
else:
    print("No")
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):
from math import log
n = list(map(int,input().split()))
x, y = n[0],n[1]
print(int(log(y/x,2)))

Fixed, accepted submission:
from math import log
n = list(map(int,input().split()))
x, y = n[0],n[1]
for i in range(0,100):
  if x * 2 ** i > y:
    print(i)
    quit()
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):
n = int(input())
word_dict = {}
for _ in range(n):
  word = str(input())
  if word in word_dict:
    word_dict[word] += 1
  else:
    word_dict[word] = 1
for k, v in word_dict.items():
  print(k, 'x', v)

Fixed, accepted submission:
n = int(input())
word_dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
  word = str(input())
  if word in word_dict:
    word_dict[word] += 1
  else:
    word_dict[word] = 1
for k, v in word_dict.items():
  print(k, 'x', v)
Problem:
Takahashi has a deposit of 100 yen (the currency of Japan) in AtCoder Bank.  The bank pays an annual interest rate of 1 % compounded annually. (A fraction of less than one yen is discarded.)  Assuming that nothing other than the interest affects Takahashi's balance, in how many years does the balance reach X yen or above for the first time?

Incorrect submission (verdict: Wrong Answer):
import math
X = int(input())
count = 0
res = 100

while res <= X:
    count +=1
    res = math.floor(1.01*res)
print(count)

Fixed, accepted submission:
import math
X = int(input())
count = 0
res = 100

while res < X:
    count +=1
    res = math.floor(1.01*res)
print(count)
Problem:
Let w be a string consisting of lowercase letters. We will call w _beautiful_ if the following condition is satisfied:    * Each lowercase letter of the English alphabet occurs even number of times in w.  You are given the string w. Determine if w is beautiful.

Incorrect submission (verdict: Wrong Answer):
s = input()

for i in s:
    count = s.count(i)
    if count % 2 != 0:
        print('NO')
        exit()

print('YES')


Fixed, accepted submission:
s = input()

for i in s:
    count = s.count(i)
    if count % 2 != 0:
        print('No')
        exit()

print('Yes')
Problem:
JOIさんが住むカナダのある都市は，南北方向にまっすぐに伸びる w 本の道路と，東西方向にまっすぐに伸びる h 本の道路により，碁盤の目の形に区分けされている．  南北方向の w 本の道路には，西から順に 1, 2, ... , w の番号が付けられている．また，東西方向の h 本の道路には，南から順に 1, 2, ... , h の番号が付けられている．西から i 番目の南北方向の道路と，南から j 番目の東西方向の道路が交わる交差点を (i, j) で表す．  JOIさんは，交差点 (1, 1) の近くに住んでおり，交差点 (w, h) の近くの会社に車で通っている．車は道路に沿ってのみ移動することができる．JOIさんは，通勤時間を短くするため，東または北にのみ向かって移動して通勤している．また，この都市では，交通事故を減らすために，次のような交通規則が設けられている：    * 交差点を曲がった車は，その直後の交差点で曲がることは出来ない．   すなわち，交差点で曲がったあとに1ブロックだけ進んで再び曲がることは許されない．このとき，JOIさんの通勤経路は何通り考えられるだろうか．  w と h が与えられたとき，JOIさんの通勤経路の個数を 100000 で割った余りを出力するプログラムを作成せよ．

Incorrect submission (verdict: Wrong Answer):
for e in iter(input,'0 0'):
 w,h=map(int,e.split())
 M=[[[1,0]*2 for _ in[0]*h]for _ in[0]*w]
 for i in range(1,w):
  for j in range(1,h):
   a,b=M[i-1][j][:2]
   c,d=M[i][j-1][2:]
   M[i][j]=[d,a+b,b,c+d]
 for x in M:print(x)
 print(sum(M[w-2][h-1][:2])+sum(M[w-1][h-2][2:]))


Fixed, accepted submission:
def s():
 for e in iter(input,'0 0'):
  w,h=map(int,e.split())
  M=[[[1,0]*2 for _ in[0]*h]for _ in[0]*w]
  for i in range(1,w):
   for j in range(1,h):
    a,b=M[i-1][j][:2]
    c,d=M[i][j-1][2:]
    M[i][j]=[d,a+b,b,c+d]
  print((sum(M[w-2][h-1][:2])+sum(M[w-1][h-2][2:]))%10**5)
s()
Problem:
For an integer N, we will choose a permutation \\{P_1, P_2, ..., P_N\\} of \\{1, 2, ..., N\\}.  Then, for each i=1,2,...,N, let M_i be the remainder when i is divided by P_i.  Find the maximum possible value of M_1 + M_2 + \cdots + M_N.

Incorrect submission (verdict: Time Limit Exceeded):
F = [0, 0, 1]
    
while True:
    try:
        N = int(input())
        
        if N > len(F) - 1:
            for i in range(len(F), N+1):
                F.append(F[i-1] + i - 1)
        
        print(F[N])
    except:
        break

Fixed, accepted submission:
R = [0, 0, 1]
while True:
    try:
        N = int(input())
        
        if N <= 2:
            print(R[N])
        else:
            print((N-1)*(N-2)//2 + N - 1)
    except:
        break
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())

if int((n+1)/2)>k:
  print("YES")
else:
  print("NO")

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

if int((n+1)/2)>=k:
  print("YES")
else:
  print("NO")
Problem:
Write a program which reads two integers a, b and an operator op, and then prints the value of a op b.  The operator op is '+', '-', '*' or '/' (sum, difference, product or quotient). The division should truncate any fractional part.

Incorrect submission (verdict: Wrong Answer):
while True:
    a = input()
    try:
        i = a.index('?')
    except:
        print(eval(a))
    else:
        break

Fixed, accepted submission:
while True:
    a = input()
    try:
        i = a.index('?')
    except:
        print(int(eval(a)))
    else:
        break
Problem:
We have a 3 \times 3 grid. A number c_{i, j} is written in the square (i, j), where (i, j) denotes the square at the i-th row from the top and the j-th column from the left.   According to Takahashi, there are six integers a_1, a_2, a_3, b_1, b_2, b_3 whose values are fixed, and the number written in the square (i, j) is equal to a_i + b_j.   Determine if he is correct.

Incorrect submission (verdict: Wrong Answer):
a, b, c = map(int, input().split())
d, e, f = map(int, input().split())
g, h, i = map(int, input().split())

if a-d==b-e==c-f and a-g==b-h==c-i and a-b--d-e==g-h and a-c==d-f==g-i:
    print("Yes")
else:
    print("No")

Fixed, accepted submission:
a, b, c = map(int, input().split())
d, e, f = map(int, input().split())
g, h, i = map(int, input().split())

if a-d==b-e==c-f and a-g==b-h==c-i and a-b==d-e==g-h and a-c==d-f==g-i:
    print("Yes")
else:
    print("No")
Problem:
Our world is one-dimensional, and ruled by two empires called Empire A and Empire B.  The capital of Empire A is located at coordinate X, and that of Empire B is located at coordinate Y.  One day, Empire A becomes inclined to put the cities at coordinates x_1, x_2, ..., x_N under its control, and Empire B becomes inclined to put the cities at coordinates y_1, y_2, ..., y_M under its control.  If there exists an integer Z that satisfies all of the following three conditions, they will come to an agreement, but otherwise war will break out.    * X < Z \leq Y   * x_1, x_2, ..., x_N < Z   * y_1, y_2, ..., y_M \geq Z  Determine if war will break out.

Incorrect submission (verdict: Wrong Answer):
N,M,X,Y = map(int,input().split())
li_x = map(int,input().split())
li_y = map(int,input().split())

x1 = set(li_x)
y1 = set(li_y)

if max(x1)>=min(y1):
    print("War")
elif max(x1)<min(y1):
    print("No war")

Fixed, accepted submission:
N,M,X,Y = map(int,input().split())
lx = list(map(int,input().split()))
lx.append(X)
ly = list(map(int,input().split()))
ly.append(Y)
if max(lx) < min(ly):
    print('No War')
else:
    print('War')