TnT/CodeNet4Repair huggingface dataset:
Problem:
You are given two integers a and b. Determine if a+b=15 or a\times b=15 or neither holds.  Note that a+b=15 and a\times b=15 do not hold at the same time.

Incorrect submission (verdict: Wrong Answer):
a, b = map(int, input().split())
print((a + b == 15) or (a * b == 15))


Fixed, accepted submission:
a, b = map(int, input().split())
if a + b == 15:
    print('+')
elif a * b == 15:
    print('*')
else:
    print('x')
Problem:
In the online judge system, a judge file may include multiple datasets to check whether the submitted program outputs a correct answer for each test case. This task is to practice solving a problem with multiple datasets.  Write a program which reads an integer x and print it as is. Note that multiple datasets are given for this problem.

Incorrect submission (verdict: Wrong Answer):
#! python3
# print_test_cases.py

for i in range(10000):
    x = int(input())
    if x == 0:
        break
    print('Case ' + str(i) + ': ' + str(x))


Fixed, accepted submission:
#! python3
# print_test_cases.py

for i in range(10000):
    x = int(input())
    if x == 0:
        break
    print('Case ' + str(i+1) + ': ' + str(x))
Problem:
You are given a positive integer X. Find the largest _perfect power_ that is at most X. Here, a perfect power is an integer that can be represented as b^p, where b is an integer not less than 1 and p is an integer not less than 2.

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

Fixed, accepted submission:
x = int(input())
li,p,ans = [],1,0

for b in range(2,int(x**0.5//1)+1):
    while b**p<=x:
        ans = max(ans,b**p)
        p += 1
        li.append(b**(p-1))
        if b**p>x:
            p = 1
            break
if x <= 3:
    print(x)
else:
    print(max(li))
Problem:
Dolphin resides in two-dimensional Cartesian plane, with the positive x-axis pointing right and the positive y-axis pointing up.   Currently, he is located at the point (sx,sy). In each second, he can move up, down, left or right by a distance of 1.   Here, both the x\- and y-coordinates before and after each movement must be integers.   He will first visit the point (tx,ty) where sx < tx and sy < ty, then go back to the point (sx,sy), then visit the point (tx,ty) again, and lastly go back to the point (sx,sy).   Here, during the whole travel, he is not allowed to pass through the same point more than once, except the points (sx,sy) and (tx,ty).   Under this condition, find a shortest path for him.

Incorrect submission (verdict: Wrong Answer):
sx,sy,tx,ty = map(int,input().split())

dx = tx-sx
dy = ty-sx
ans = "R"*dx+"U"*dy+"L"*dx+"D"*dy+"D"+"R"*(dx+1)+"U"*(dy+1)+"L"+"L"*(dx+1)+"D"*(dy+1)

print(ans)

Fixed, accepted submission:
sx,sy,tx,ty = map(int,input().split())
tx -= sx
ty -= sy
ans = ""
ans += "U" * ty + "R" * tx
ans += "D" * ty + "L" * tx
ans += "L" + "U"*(ty+1) + "R"*(tx+1) + "D"
ans += "R" + "D"*(ty+1) + "L"*(tx+1) + "U"
print(ans)
Problem:
Taro is going to play a card game. However, now he has only n cards, even though there should be 52 cards (he has no Jokers).  The 52 cards include 13 ranks of each of the four suits: spade, heart, club and diamond.

Incorrect submission (verdict: Wrong Answer):
n=int(input())
cards={}
for i in range(n):
    card =input()
    cards[card]=1
    
#print(cards)

for c in ['S','H','C','D']:
    for n in range (1,13):
        key=c+''+str(n)
        if not key in cards:
            print(key)


Fixed, accepted submission:
n=int(input())
cards={}
for i in range(n):
    card =input()
    cards[card]=1
    
#print(cards)

for c in ['S','H','C','D']:
    for n in range (1,14):
        key=c+' '+str(n)
        if not key in cards:
            print(key)
Problem:
Snuke has come to a store that sells boxes containing balls. The store sells the following three kinds of boxes:    * Red boxes, each containing R red balls   * Green boxes, each containing G green balls   * Blue boxes, each containing B blue balls  Snuke wants to get a total of exactly N balls by buying r red boxes, g green boxes and b blue boxes. How many triples of non-negative integers (r,g,b) achieve this?

Incorrect submission (verdict: Wrong Answer):
a,b,c,n=map(int,input().split())
d=[a,b,c]
d.sort()
e=0
for i in range(0,n//c):
  n=n-c*i
  for k in range(0,n//b):
    n=n-b*i
    if n//a==0:
      e=e+1
print(e)
  

Fixed, accepted submission:
a,b,c,n=map(int,input().split())
d=[a,b,c]
d.sort()
a=d[0]
b=d[1]
c=d[2]
e=0
for i in range(0,n//c+1):
    for k in range(0,(n-c*i)//b+1):
        if ((n-c*i-b*k)%a)==0:
            e=e+1
print(e)
Problem:
We ask you to select some number of positive integers, and calculate the sum of them.  It is allowed to select as many integers as you like, and as large integers as you wish. You have to follow these, however: each selected integer needs to be a multiple of A, and you need to select at least one integer.  Your objective is to make the sum congruent to C modulo B. Determine whether this is possible.  If the objective is achievable, print `YES`. Otherwise, print `NO`.

Incorrect submission (verdict: Wrong Answer):
A,B,C = (int(T) for T in input().split())
Flag = False
for T in range(1,B+1):
    if (T*A)%B==C:
        Flag = True
print(['No','Yes'][Flag])

Fixed, accepted submission:
A,B,C = (int(T) for T in input().split())
Flag = False
for T in range(1,B+1):
    if (T*A)%B==C:
        Flag = True
print(['NO','YES'][Flag])
Problem:
In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year.   For example, May 3, 2018 is written as 2018-5-3, or 5-3 without the year.  In this country, a date is called _Takahashi_ when the month and the day are equal as numbers. For example, 5-5 is Takahashi.   How many days from 2018-1-1 through 2018-a-b are Takahashi?

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-

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

if b > a:
    print(a)
else:
    print(a-1)


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

if b >= a:
    print(a)
else:
    print(a-1)
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):
def main():
  s = input()
  dream = False
  erase = False

  while s:
    if s.startswith('dream'):
      s = s[5:]
      dream = True
      erase = False
    elif s.startswith('erase'):
      s = s[5:]
      dream = False
      erase = True
    elif s.startswith('er') and dream:
      s = s[2:]
      dream = False
    elif s.startswith('r') and erase:
      s = s[1:]
      erase = False
    else:
      return False
  
  return True

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

Fixed, accepted submission:
# dfs
import sys
sys.setrecursionlimit(10**6)

C = ['dream', 'dreamer', 'erase', 'eraser']
S = input()
L = len(S)

def dfs(l):
    if l == L:
        return True
    elif l > L:
        return False

    for c in C:
        if S.find(c, l, l+7) == l:
            if dfs(l+len(c)):
                return True
    return False

print('YES' if dfs(0) else 'NO')
Problem:
An _X -layered kagami mochi_ (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter than that of the mochi directly below it. For example, if you stack three mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, you have a 3-layered kagami mochi; if you put just one mochi, you have a 1-layered kagami mochi.  Lunlun the dachshund has N round mochi, and the diameter of the i-th mochi is d_i centimeters. When we make a kagami mochi using some or all of them, at most how many layers can our kagami mochi have?

Incorrect submission (verdict: Wrong Answer):
N = int(input())
d = list(map(int, input().split()))


d.sort()
now = 0
ans = 0
for di in d:
  if di > now:
    ans += 1
    now = di
    
print(ans)

Fixed, accepted submission:
N = int(input())
d = [int(input()) for _ in range(N)]

d.sort()
now = 0
ans = 0
for di in d:
  if di > now:
    ans += 1
    now = di
    
print(ans)
Problem:
You are given a string S consisting of lowercase English letters. Determine whether all the characters in S are different.

Incorrect submission (verdict: Wrong Answer):
data=list(input())
c=0
for i in range(0,len(data)-1):
    for j in range(i+1,len(data)):
        if data[i]==data[j]:
            c=c+1
if c==0:
    print('Yes')
else:
    print('No')

Fixed, accepted submission:
data=list(input())
c=0
for i in range(0,len(data)-1):
    for j in range(i+1,len(data)):
        if data[i]==data[j]:
            c=c+1
if c==0:
    print('yes')
else:
    print('no')
Problem:
There are N balls placed in a row. AtCoDeer the deer is painting each of these in one of the K colors of his paint cans. For aesthetic reasons, any two adjacent balls must be painted in different colors.  Find the number of the possible ways to paint the balls.

Incorrect submission (verdict: Wrong Answer):
n,k = map(int, input().split())
ans = k * pow(k-1, n-1)

Fixed, accepted submission:
n,k = map(int, input().split())
ans = k * pow(k-1, n-1)
print(ans)
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())
ab=[list(map(int, input().split())) for _ in range(m)]

graph = [[] for _ in range(n)]
for v in ab:
    graph[v[0]-1].append(v[1]-1)
    graph[v[1]-1].append(v[0]-1)
# print(graph)

from collections import deque

queue = deque([0])
d = [100] * n
d[0] = 0
while queue:
    v = queue.popleft()
    for i in graph[v]:
        if d[i]==10**6:
            d[i] = d[v] + 1
            queue.append(i)
# print(d)

print('POSSIBLE' if d[n-1]<=2 else 'IMPOSSIBLE')



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

graph = [[] for _ in range(n)]
for v in ab:
    graph[v[0]-1].append(v[1]-1)
    graph[v[1]-1].append(v[0]-1)
# print(graph)

from collections import deque

queue = deque([0])
d = [10**6] * n
d[0] = 0
while queue:
    v = queue.popleft()
    for i in graph[v]:
        if d[i]==10**6:
            d[i] = d[v] + 1
            queue.append(i)
# print(d)

print('POSSIBLE' if d[n-1]<=2 else 'IMPOSSIBLE')
Problem:
Snuke has a grid consisting of three squares numbered 1, 2 and 3. In each square, either `0` or `1` is written. The number written in Square i is s_i.  Snuke will place a marble on each square that says `1`. Find the number of squares on which Snuke will place a marble.

Incorrect submission (verdict: Wrong Answer):
a,b,c = input()
d = 0
if a == 1:
    d += 1
if b == 1:
    d += 1
if c == 1:
    d += 1
print(d)


Fixed, accepted submission:
print(input().count('1'))
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 == 5 and B == 7 and C == 7:
  print("YES")
elif A == 7 and B == 5 and C == 7:
  print("YES")
elif A == 7 and B == 7 and C == 5:
  print("YES")
else:
  print("NO")

Fixed, accepted submission:
A, B, C = map(int, input().split())
if A == 5 and B == 5 and C == 7:
  print("YES")
elif A == 5 and B == 7 and C == 5:
  print("YES")
elif A == 7 and B == 5 and C == 5:
  print("YES")
else:
  print("NO")
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())

print('Left' if A+B<C+D else 'Balanced' if A+B==C+D else 'Right')

Fixed, accepted submission:
A,B,C,D=map(int,input().split())

print('Left' if A+B>C+D else 'Balanced' if A+B==C+D else 'Right')
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 = input().split(" ")
a.sort()
if (a[0] == a[1] == 5) and a[2] == 7:
  print("Yes")
else:
  print("No")


Fixed, accepted submission:
a = input()
if a.count("7") ==1 and a.count("5") == 2:
    print("YES")
else:
    print("NO")
Problem:
You are given a grid with 2 rows and 3 columns of squares. The color of the square at the i-th row and j-th column is represented by the character C_{ij}.  Write a program that prints `YES` if this grid remains the same when rotated 180 degrees, and prints `NO` otherwise.

Incorrect submission (verdict: Wrong Answer):
a = list(map(str, input()))
b = list(map(str, input()))

if a[0] == b[0] and a[1] == b[1] and a[2] == b[2]:
    print('Yes')
else:
    print('No')
    

Fixed, accepted submission:
a = list(map(str, input()))
b = list(map(str, input()))

if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print('YES')
else:
    print('NO')
Problem:
In this problem, a date is written as Y-M-D. For example, 2019-11-30 means November 30, 2019.  Integers M_1, D_1, M_2, and D_2 will be given as input.   It is known that the date 2019-M_2-D_2 follows 2019-M_1-D_1.   Determine whether the date 2019-M_1-D_1 is the last day of a month.

Incorrect submission (verdict: Wrong Answer):
a,b=map(int,input().split())
c,d=map(int,input().split())
	
if a==c:
	print("1")
else:
	print("0")

Fixed, accepted submission:
a,b=map(int,input().split())
c,d=map(int,input().split())
	
if a==c:
	print(0)
else:
	print(1)
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):
# coding: utf-8
import math

string=input().split()
number=int(string[0]+string[1])
x=math.sqrt(number)
if int(x)==x:
    print("yes")
else:
    print("no")

Fixed, accepted submission:
# coding: utf-8
import math

string=input().split()
number=int(string[0]+string[1])
x=math.sqrt(number)
if int(x)==x:
    print("Yes")
else:
    print("No")
Problem:
You are parking at a parking lot. You can choose from the following two fee plans:    * Plan 1: The fee will be A×T yen (the currency of Japan) when you park for T hours.   * Plan 2: The fee will be B yen, regardless of the duration.  Find the minimum fee when you park for N hours.

Incorrect submission (verdict: Wrong Answer):
N, A, B = map(int,input().split())
print(min(N + A , B))

Fixed, accepted submission:
N, A, B = map(int,input().split())
print(min(N * A , B))
Problem:
You are given an integer sequence of length N, a_1,a_2,...,a_N.  For each 1≤i≤N, you have three choices: add 1 to a_i, subtract 1 from a_i or do nothing.  After these operations, you select an integer X and count the number of i such that a_i=X.  Maximize this count by making optimal choices.

Incorrect submission (verdict: Wrong Answer):
from collections import defaultdict

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

D = defaultdict(lambda: 0)
for a in A:
    D[a] += 1

M = set()
highest = max(D.values())
for k, v in D.items():
    if v == highest:
        M.add(k)

ans = 0
for m in M:
    ans = max(ans, D[m - 1] + D[m] + D[m + 1])
print(ans)


Fixed, accepted submission:
from collections import defaultdict

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

D = defaultdict(lambda: 0)
for a in A:
    D[a] += 1

ans = 0
for a in A:
    ans = max(
        ans,
        D[a - 2] + D[a - 1] + D[a],
        D[a - 1] + D[a] + D[a + 1],
        D[a] + D[a + 1] + D[a + 2],
    )
print(ans)
Problem:
Smeke has decided to participate in AtCoder Beginner Contest (ABC) if his current rating is less than 1200, and participate in AtCoder Regular Contest (ARC) otherwise.  You are given Smeke's current rating, x. Print `ABC` if Smeke will participate in ABC, and print `ARC` otherwise.

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

if x > 1200:
  print('ABC')
else:
  print('ARC')

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

if x < 1200:
  print('ABC')
else:
  print('ARC')
Problem:
There are N sightseeing spots on the x-axis, numbered 1, 2, ..., N. Spot i is at the point with coordinate A_i. It costs |a - b| yen (the currency of Japan) to travel from a point with coordinate a to another point with coordinate b along the axis.  You planned a trip along the axis. In this plan, you first depart from the point with coordinate 0, then visit the N spots in the order they are numbered, and finally return to the point with coordinate 0.  However, something came up just before the trip, and you no longer have enough time to visit all the N spots, so you decided to choose some i and cancel the visit to Spot i. You will visit the remaining spots as planned in the order they are numbered. You will also depart from and return to the point with coordinate 0 at the beginning and the end, as planned.  For each i = 1, 2, ..., N, find the total cost of travel during the trip when the visit to Spot i is canceled.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = [int(i) for i in input().split()]
ans = [0] * n
summ = sum([abs(a[i]-a[i+1]) for i in range(n-1)])
summ += abs(a[0]) + abs(a[-1])
for i in range(1, n-1):
  ans[i] = summ -abs(a[i-1]-a[i])-abs(a[i+1]-a[i])+abs(a[i-1]-a[i+1])
ans[0] = summ - abs(a[0]) -abs(a[0]-a[1]) + abs(a[1])
ans[-1] = summ - abs(a[-1]) -abs(a[-1]-a[-2])+abs(a[-2])

Fixed, accepted submission:
N = int(input())
A = [int(i) for i in input().split()]
A.insert(0, 0)
A.append(0)

dif_1 = [0] * (N+1)
dif_2 = [0] * N

for i in range(N+1):
    dif_1[i] = abs(A[i] - A[i+1])

for i in range(N):
    dif_2[i] = abs(A[i] - A[i+2])

num = sum(dif_1)

for i in range(N):
    print(num - (dif_1[i] + dif_1[i+1]) + dif_2[i])
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=int(input())
if n%1000==0:
  print(0)
else:
  print(n//1000+1)

Fixed, accepted submission:
n=int(input())
if n%1000==0:
  print(0)
else:
  print((n//1000+1)*1000-n)
Problem:
Write a program which reads $n$ dices constructed in the same way as [Dice I](description.jsp?id=ITP1_11_A), and determines whether they are all different. For the determination, use the same way as [Dice III](description.jsp?id=ITP1_11_C).

Incorrect submission (verdict: Wrong Answer):
class dice:
    def __init__(self, pip):
        self.pip = pip
        
    def move(self,dir):
        if str(dir) == "E":
            self.pip[0],self.pip[2],self.pip[3],self.pip[5] = self.pip[3],self.pip[0],self.pip[5],self.pip[2]
        elif str(dir) == "W":
            self.pip[0],self.pip[2],self.pip[3],self.pip[5] = self.pip[2],self.pip[5],self.pip[0],self.pip[3]
        elif str(dir) == "N":
            self.pip[0],self.pip[1],self.pip[4],self.pip[5] = self.pip[1],self.pip[5],self.pip[0],self.pip[4]
        elif str(dir) == "S":
            self.pip[0],self.pip[1],self.pip[4],self.pip[5] = self.pip[4],self.pip[0],self.pip[5],self.pip[1]

n = int(input())
ans = "Yes"
ds =[]

for i in range(n):
    ds.append(dice(list(map(int,input().split()))))

for i in range(len(ds)-1):
    for j in range(i+1,len(ds)):
        d_tmp = dice(ds[j].pip)
        for op in "EEENEEENEEESEEESEEENEEEN":
            if ds[i].pip == d_tmp.pip:
                ans = "No"
                break

print(ans)

Fixed, accepted submission:
class dice:
    def __init__(self, pip):
        self.pip = pip
        
    def move(self,dir):
        if str(dir) == "E":
            self.pip[0],self.pip[2],self.pip[3],self.pip[5] = self.pip[3],self.pip[0],self.pip[5],self.pip[2]
        elif str(dir) == "W":
            self.pip[0],self.pip[2],self.pip[3],self.pip[5] = self.pip[2],self.pip[5],self.pip[0],self.pip[3]
        elif str(dir) == "N":
            self.pip[0],self.pip[1],self.pip[4],self.pip[5] = self.pip[1],self.pip[5],self.pip[0],self.pip[4]
        elif str(dir) == "S":
            self.pip[0],self.pip[1],self.pip[4],self.pip[5] = self.pip[4],self.pip[0],self.pip[5],self.pip[1]

n = int(input())
ans = "Yes"
ds =[]

for i in range(n):
    ds.append(dice(list(map(int,input().split()))))

for i in range(len(ds)-1):
    for j in range(i+1,len(ds)):
        d_tmp = dice(ds[j].pip)
        for op in "EEENEEENEEESEEESEEENEEEN":
            if ds[i].pip == d_tmp.pip:
                ans = "No"
                break
            d_tmp.move(op)

print(ans)
Problem:
You are given a string S consisting of lowercase English letters. Determine whether all the characters in S are different.

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

l = []

ans = 'Yes'

for s in S:
    if s not in l:
        l.append(s)
    else:
        ans = 'No'
        break

print(ans)

Fixed, accepted submission:
S = input()

l = []

ans = 'yes'

for s in S:
    if s not in l:
        l.append(s)
    else:
        ans = 'no'
        break

print(ans)
Problem:
AtCoDeer has three cards, one red, one green and one blue.   An integer between 1 and 9 (inclusive) is written on each card: r on the red card, g on the green card and b on the blue card.   We will arrange the cards in the order red, green and blue from left to right, and read them as a three-digit integer.   Is this integer a multiple of 4?

Incorrect submission (verdict: Wrong Answer):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
r,g,b=map(int,input().split())

if (10*b+g)%4==0:
	print("YES")
else:
	print("NO")

Fixed, accepted submission:
r,g,b=map(int,input().split())
a=10*g+b
if a%4==0:
  print("YES")
else:
  print("NO")
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 X in ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]:
    if int(S.count(X))%2==1:
        print("NO")
        break
else:
    print("YES")

Fixed, accepted submission:
w=input()
for X in ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]:
    if int(w.count(X))%2==1:
        print("No")
        break
else:
    print("Yes")