ZhenlongDai/ACPR huggingface dataset:
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

from sys import stdin
import re

s_in = lambda: stdin.readline()[:-1] 
d_in = lambda: int(stdin.readline()) 
ds_in = lambda: list(map(int, stdin.readline().split())) 

S = s_in()
T = s_in()
N = len(S)

rec = []
idxes = [i for i in range(26)]

def alpnum(s):
    return ord(s) - ord('a')

for i in range(N):
    si = alpnum(S[i])
    ti = alpnum(T[i])
    if (idxes[si] != ti):
        idx = idxes.index(ti)
        idxes[si], idxes[idx] = idxes[idx], idxes[si]
        if (idxes[si] in rec) or (ti in rec):
            print('No')
            exit()
    rec.append(ti)
print('Yes')


Failing test case input:
azzle
apqle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

from sys import stdin
import re

s_in = lambda: stdin.readline()[:-1] 
d_in = lambda: int(stdin.readline()) 
ds_in = lambda: list(map(int, stdin.readline().split())) 

S = s_in()
T = s_in()
N = len(S)

rec = []
idxes = [i for i in range(26)]

def alpnum(s):
    return ord(s) - ord('a')

for i in range(N):
    si = alpnum(S[i])
    ti = alpnum(T[i])
    if (idxes[si] != ti):
        if (idxes[si] in rec) or (ti in rec):
            print('No')
            exit()
        idx = idxes.index(ti)
        idxes[si], idxes[idx] = idxes[idx], idxes[si]
    rec.append(ti)
print('Yes')

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
a = {}
for i, j in zip(s, t):
    if i in a:
        if a[i] != j:
            print("No")
            exit()
    elif j in a:
        if a[j] != i:
            print("No")
            exit()
    a[i] = j
    a[j] = i
print("Yes")


Failing test case input:
abcdefghijklmnopqrstuvwxyz
ibyhqfrekavclxjstdwgpzmonu

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
a = {}
b=set()
for i, j in zip(s, t):
    if i in a:
        if a[i] != j:
            print("No")
            exit()
    else:
        if j in b:
            print("No")
            exit()
        b.add(j)
        a[i]=j
print("Yes")

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
S=input()
T=input()
a1=collections.Counter(S)
a2=collections.Counter(T)
if a1==a2:
    print('Yes')
else:
    print('No')

Failing test case input:
azyle
bpqld

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import collections
S=input()
T=input()
a1=collections.Counter(S)
a2=collections.Counter(T)
x=''
for i in range(len(S)):
    if a1[S[i]]!=a2[T[i]]:
        x='No'
if x=='':
    print('Yes')
else:
    print(x)
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()


NUMBER_OF_ALPHABETS = 26
S_length = len(S)
if S_length < NUMBER_OF_ALPHABETS:
    print('Yes')
    exit()

ALPHABETS = 'abcdefghijklmnopqrstuvwxyz'
answer = 'Yes'
for alphabet in ALPHABETS:
    i = S.find(alphabet)
    if i == -1: continue

    replaced_S = S.replace(S[i], '')
    replaced_T = T.replace(T[i], '')
    if len(replaced_S) != len(replaced_T):
        answer = 'No'
        break
print(answer)














Failing test case input:
adjjphvc
ddcoccsr

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()








ALPHABETS = 'abcdefghijklmnopqrstuvwxyz'
answer = 'Yes'
for alphabet in ALPHABETS:
    i = S.find(alphabet)
    if i == -1: continue

    replaced_S = S.replace(S[i], '')
    replaced_T = T.replace(T[i], '')
    
    if len(replaced_S) != len(replaced_T):
        answer = 'No'
        break
print(answer)

Problem: p03252
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()
t = input()
li_s = list(s)
li_t = list(t)
ma = {}
for i,j in zip(li_s,li_t):
    if i != j:
        if j not in ma:
            ma[j] = i
        elif ma[j] != i:
            print('No')
            exit()
print('Yes')

Failing test case input:
azzle
dlqpa

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
t = input()
li_s = list(s)
li_t = list(t)
ma = {}
ma_2 = {}
for i,j in zip(li_s,li_t):
    if j not in ma:
        ma[j] = i
    elif ma[j] != i:
        print('No')
        exit()

    if i not in ma_2:
        ma_2[i] = j
    elif ma_2[i] != j:
        print('No')
        exit()
print('Yes')

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
from collections import defaultdict
s = input()
t = input()
d1 = defaultdict(set)
d2 = defaultdict(set)

for i in range(len(s)):
    d1[t[i]].add(s[i])
    d2[s[i]].add(t[i])
    print(d1,d2)
    if len(d1[t[i]])>1 or len(d2[s[i]])>1:
        print("No")
        sys.exit()
print("Yes")


Failing test case input:
adjjphvc
ddcoccsr

Expected output:
No


Actual output:
defaultdict(<class 'set'>, {'d': {'a'}}) defaultdict(<class 'set'>, {'a': {'d'}})
defaultdict(<class 'set'>, {'d': {'a', 'd'}}) defaultdict(<class 'set'>, {'a': {'d'}, 'd': {'d'}})
No


Fixed submission (verdict: Accepted):
import sys
from collections import defaultdict
s = input()
t = input()
d1 = defaultdict(set)
d2 = defaultdict(set)

for i in range(len(s)):
    d1[t[i]].add(s[i])
    d2[s[i]].add(t[i])
    if len(d1[t[i]])>1 or len(d2[s[i]])>1:
        print("No")
        sys.exit()
print("Yes")
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
S = list(input())
T = list(input())
l = len(S)
d = defaultdict(str)
for i in range(l):
    if S[i] != T[i]:
        if d[S[i]] == "":
            d[S[i]] = T[i]
        elif d[S[i]] == T[i]:
            pass
        else:
          	print('No')
          	exit()
print('Yes')

Failing test case input:
abcdefghijklmnopqrstuvwxyz
ibyhqfrekavclxjstdwgpznonu

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import defaultdict
S = list(input())
T = list(input())
l = len(S)
ds = defaultdict(str)
dt = defaultdict(str)
for i in range(l):
    if ds[S[i]] == "":
        ds[S[i]] = T[i]
    elif ds[S[i]] == T[i]:
        pass
    else:
        print('No')
        exit()
    if dt[T[i]] == "":
        dt[T[i]] = S[i]
    elif dt[T[i]] == S[i]:
        pass
    else:
        print('No')
        exit()

print('Yes')

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
S = input()
T = input()
d = defaultdict(str)
ans = 'Yes'
for s, t in zip(S, T):
    if len(d[s]) > 0:
        if d[s] != t:
            ans = 'No'
    if len(d[t]) > 0:
        if d[t] != s:
            ans = 'No'
    d[s] = t
    d[t] = s

print(ans)

Failing test case input:
abcdefghijklmnopqrstuvwxyz
unomzpgwdtsjxlcvakerfqhybi

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import defaultdict
S = input()
T = input()
s_map = defaultdict(str)
t_map = defaultdict(str)
ans = 'Yes'
for s, t in zip(S, T):
    if len(s_map[s]) > 0:
        if s_map[s] != t:
            ans = 'No'
    if len(t_map[t]) > 0:
        if t_map[t] != s:
            ans = 'No'
    s_map[s] = t
    t_map[t] = s

print(ans)

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
s=Counter(list(input()))
t=Counter(list(input()))
s,t=list(s.values()),list(t.values())
print("Yes" if s.sort()==s.sort() else "No")

Failing test case input:
uajcodhj
dedndcrr

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import Counter
s=Counter(list(input()))
t=Counter(list(input()))
s,t=list(s.values()),list(t.values())
print("Yes" if sorted(s)==sorted(t) else "No")
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = str(input())
t = str(input())

d = {}

c = 0
for i in range(len(s)):
  if s[i] not in d:
    d[s[i]] = c
    c += 1

d_ = {}
for i in range(len(t)):
  if t[i] not in d_:
    d_[t[i]] = d[s[i]]

for i in range(len(s)):
  if d[s[i]] != d_[t[i]]:
    print('No')
    exit()
else:
  print('Yes')

Failing test case input:
azzel
apqle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = str(input())
t = str(input())

d = {}

c = 0
for i in range(len(s)):
  if s[i] not in d:
    d[s[i]] = c
    c += 1

d_ = {}
used = set()
for i in range(len(t)):
  if t[i] not in d_ and s[i] not in used:
    d_[t[i]] = d[s[i]]
    used.add(s[i])
  elif t[i] not in d_ and s[i] in used:
    print('No')
    exit()
  else:
    pass

for i in range(len(s)):
  if d[s[i]] != d_[t[i]]:
    print('No')
    exit()
else:
  print('Yes')

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



S = input()
T = input()
S_map = {}
T_map = {}
l = len(S)
S_cnt = 0
T_cnt = 0
for i in range(l):
	s,t = S[i], T[i]
	if s in S_map:
		s_id = S_map[s]
	else:
		s_id = S_cnt
		S_map[s] = S_cnt
		S_cnt += 1
	if t in T_map:
		t_id = T_map[t]
	else:
		t_id = T_cnt
		T_map[t] = T_cnt
		T_cnt += 1
	if s_id != t_id:
		print("No")
		break
print("Yes")

Failing test case input:
cvhpjjda
ddcoccsr

Expected output:
No


Actual output:
No
Yes


Fixed submission (verdict: Accepted):



S = input()
T = input()
S_map = {}
T_map = {}
l = len(S)
k = 0
S_cnt = 0
T_cnt = 0
for i in range(l):
	s,t = S[i], T[i]
	if s in S_map:
		s_id = S_map[s]
	else:
		s_id = S_cnt
		S_map[s] = S_cnt
		S_cnt += 1
	if t in T_map:
		t_id = T_map[t]
	else:
		t_id = T_cnt
		T_map[t] = T_cnt
		T_cnt += 1
	if s_id != t_id:
		print("No");k+=1
		break
if k == 0:
    print("Yes")

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
alphabets = "abcdefghijklmnopqrstuvwxyz"

S_list=[]
T_list=[]
for c in alphabets:
    Scnt = S.count(c)
    Tcnt = T.count(c)
    if Scnt > 0:
        S_list.append(Scnt)
    if Tcnt > 0:
        T_list.append(Tcnt)

if sorted(S_list) is sorted(T_list):
    print('Yes')
else:
    print('No')

Failing test case input:
elyza
dlqpa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
alphabets = "abcdefghijklmnopqrstuvwxyz"

S_list=[]
T_list=[]
for c in alphabets:
    Scnt = S.count(c)
    Tcnt = T.count(c)
    if Scnt > 0:
        S_list.append(Scnt)
    if Tcnt > 0:
        T_list.append(Tcnt)

if sorted(S_list) == sorted(T_list):
    print('Yes')
else:
    print('No')
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
S = (input())
T = (input())

count1 = collections.Counter(S)
count2 = collections.Counter(T)

count1=sorted(count1.items(), key=lambda x: x[1])
count2=sorted(count2.items(), key=lambda x: x[1])

if len(S) == len(T):
    if len(count1) != len(count2):
        print('No')
    else:
        for k1, k2 in zip(count1, count2):
            if k1[1] > 1:
                indexes = [i for i, x in enumerate(S) if x == k1[0]]
                indexes2 = [i for i, x in enumerate(S) if x == k1[0]]
                if indexes != indexes2:
                    print('No')
            else:
                print('Yes')
else:
    print('No')






Failing test case input:
azyle
bpqkd

Expected output:
Yes


Actual output:
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
import collections
S = (input())
T = (input())

count1 = collections.Counter(S)
count2 = collections.Counter(T)

count1=sorted(count1.items(), key=lambda x: x[1])
count2=sorted(count2.items(), key=lambda x: x[1])


indexes = []
indexes2 = []

if len(S) == len(T):
    if len(count1) != len(count2):
        print('No')
    else:
        for k1, k2 in zip(count1, count2):
            if k1[1] > 1:
                indexes.append(tuple([i for i, x in enumerate(S) if x == k1[0]]))
                indexes2.append(tuple([i for i, x in enumerate(T) if x == k2[0]]))
        if set(indexes) == set(indexes2):
            print('Yes')
        else:
            print('No')
else:
    print('No')

Problem: p03252
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def main():
    s=input()
    t=input()
    n=len(s)
    zumi=[]
    for i in range(n):
        ss= s[i]
        st= t[i]
        if ss != st:
            if st in zumi:
                return "No"
            zumi.append(st)
            s=s.translate(str.maketrans({ss:st,st:ss}))
    return "Yes"

print(main())

Failing test case input:
azzle
apqld

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    s=input()
    t=input()
    n=len(s)
    zumi=[]
    for i in range(n):
        ss= s[i]
        st= t[i]
        if ss != st:
            if st in zumi or ss in zumi:
                return "No"
            zumi.append(st)
            s=s.translate(str.maketrans({ss:st,st:ss}))
    return "Yes"

print(main())

Problem: p03252
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()
t = input()

end = []
flag = 1
for i in range(len(s)):
  if s[i] not in end:
    end.append(s[i])
    for j in range(len(t)):
      if s[i] == s[j]:
        if t[i] != t[j]:
          flag = 0

if flag == 0:
  print('No')
else:
  print('Yes')

Failing test case input:
cjduoahi
redcoder

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
t = input()

end = []
flag = 1
for i in range(len(s)):
  if s[i] not in end:
    end.append(s[i])
    for j in range(len(t)):
      if s[i] == s[j]:
        if t[i] != t[j]:
          flag = 0
      else:
        if t[i] == t[j]:
          flag = 0

if flag == 0:
  print('No')
else:
  print('Yes')
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())
T=list(input())
slist=[None]*26
flag=True
for i in range(len(S)):
    if T[i] not in slist or slist[ord(S[i])-97] == T[i]:
        slist[ord(S[i])-97] = T[i]
    else:
        flag = False
if flag:
    print("Yes")
else:
    print("No")
    



Failing test case input:
zyxwvutsrqpnnmlkjihgfedcba
unomzpgwdtsjxlcvakerfqhybi

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S=list(input())
T=list(input())
slist=[None]*26
flag=True
for i in range(len(S)):
    if slist[ord(S[i])-97] == None and T[i] not in slist:
        slist[ord(S[i])-97] = T[i]
    elif slist[ord(S[i])-97] != T[i]:
        flag = False
        break
    else:
        slist[ord(S[i])-97] = T[i]


if flag:
    print("Yes")
else:
    print("No")

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict

d1=defaultdict(lambda:'AA')
d2=defaultdict(lambda:'AA')
S=input()
T=input()
flag =True
for i in range(len(S)):
	if d1[T[i]]!='AA':
		if d1[T[i]] != S[i]:
			flag = False
			break
	d1[T[i]]=S[i]

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

Failing test case input:
azzle
apqld

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import defaultdict

d1=defaultdict(lambda:'AA')
d2=defaultdict(lambda:'AA')
S=input()
T=input()
flag =True
for i in range(len(S)):
	if d1[S[i]]!='AA':
		if d1[S[i]] != T[i]:
			flag = False
			break
	if d2[T[i]]!='AA':
		if d2[T[i]]!=S[i]:
			flag =False
			break
	d1[S[i]]=T[i]
	d2[T[i]]=S[i]
if flag:
	print('Yes')
else:
	print('No')
Problem: p03252
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = str(input())
t = str(input())
memo = {}
ifadd = False
for i in range(len(s)):
    sor = s[i]
    des = t[i]
    if sor not in memo:
        memo[sor] = des
    else:
        if memo[sor]!=des:
            ifadd = True



ans = "Yes"
visited = set()
if ifadd == True:
    ans = "No"
else:
    for sta in memo:
        if sta not in visited:
            visited.add(sta)
            gol = memo[sta]
            fsta = sta
            while(gol!=sta):
                if gol not in memo:
                    if sta != fsta:
                        ans = "No"
                    gol = sta
                else:
                    sta,gol = gol,memo[gol]
                    visited.add(sta)
                    if gol in visited:
                        gol = sta
                        
print(ans)

Failing test case input:
azyle
elqpa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

s = str(input())
t = str(input())
memo = {}
ifadd = False
ifsamedest = False
destlist = set()
for i in range(len(s)):
    sor = s[i]
    des = t[i]
    if sor not in memo:
        memo[sor] = des
        if des in destlist:
            ifsamedest = True
        destlist.add(des)
    else:
        if memo[sor]!=des:
            ifadd = True






ans = "Yes"
visited = set()
if ifadd == True:
    ans = "No"
if ifsamedest == True:
    ans = "No"
else:
    for sta in memo:
        if sta not in visited:
            visited.add(sta)
            gol = memo[sta]
            fsta = sta
            while(gol!=sta):
                if gol not in memo:
                    gol = sta
                else:
                    sta,gol = gol,memo[gol]
                    visited.add(sta)
                    if gol == fsta:
                        gol = sta
                        
print(ans)

Problem: p03252
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict
s=list(input())
t=list(input())
change_st=defaultdict(int)
change_ts=defaultdict(int)
for i in range(len(s)):
    if change_st[s[i]]==0:
        change_st[s[i]]=t[i]
    else:
        if change_st[s[i]]!=t[i]:
            print("No")
            break
    if change_ts[t[i]]==0:
        change_ts[t[i]]==0
    else:
        if change_ts[t[i]]!=s[i]:
            pritn("No")
            break
else:
    print("Yes")

Failing test case input:
cvhpjjda
ddcoccsr

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import defaultdict
s=list(input())
t=list(input())
change_st=defaultdict(int)
change_ts=defaultdict(int)
for i in range(len(s)):
    if change_st[s[i]]==0:
        change_st[s[i]]=t[i]
    else:
        if change_st[s[i]]!=t[i]:
            print("No")
            break
    if change_ts[t[i]]==0:
        change_ts[t[i]]=s[i]
    else:
        if change_ts[t[i]]!=s[i]:
            print("No")
            break
else:
    print("Yes")
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
b = list(input())
c = len(a)
p = 0
d = [0 for i in range(27)]
if a == b:
	print("Yes")
else:
	for i in range(c):
		if a[i] == b[i]:
			k = ord(a[i])-97
			if d[k] != 2:
				d[k] = 1
			else:
				p = 1
				break
		else:
			k = ord(b[i])-97
			if d[k] != 1:
				d[k] = 2
			else:
				p = 1
				break
	if p == 1:
		print("No")
	else:
		print("Yes")


Failing test case input:
`djcoivj
rscdoded

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a = list(input())
b = list(input())
c = len(a)
p = 0
d = [0 for i in range(27)]
l = [[]for i in range(27)]
h = [[]for i in range(27)]
ll = [0 for i in range(27)]
if a == b:
	print("Yes")
else:
	for i in range(c):
		k = ord(b[i])-97
		if a[i] in l[k]:
			p = 0
		else:
			if len(l[k]) == 0:
				l[k].append(a[i])
			else:
				p = 1
				break
		k = ord(a[i])-97
		if b[i] in h[k]:
			p = 0
		else:
			if len(h[k]) == 0:
				h[k].append(b[i])
			else:
				p = 1
				break
	if p == 1:
		print("No")
	else:
		print("Yes")

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()


NUMBER_OF_ALPHABETS = 26
S_length = len(S)
if S_length < NUMBER_OF_ALPHABETS:
    print('Yes')
    exit()

ALPHABETS = 'abcdefghijklmnopqrstuvwxyz'
answer = 'Yes'
for i in range(S_length):
    replaced_S = S.replace(S[i], '')
    replaced_T = T.replace(T[i], '')
    if len(replaced_S) != len(replaced_T):
        answer = 'No'
        break
print(answer)






Failing test case input:
cjduoahi
redcoder

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()








ALPHABETS = 'abcdefghijklmnopqrstuvwxyz'
answer = 'Yes'
for alphabet in ALPHABETS:
    i = S.find(alphabet)
    if i == -1: continue

    replaced_S = S.replace(S[i], '')
    replaced_T = T.replace(T[i], '')
    
    if len(replaced_S) != len(replaced_T):
        answer = 'No'
        break
print(answer)

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

S = input()
T = input()

r_dic = {}
for i in range(len(S)):
    s = S[i]
    t = T[i]
    
    

    if(t in r_dic):
        if(r_dic[t] != s):
            print("No")
            sys.exit()
    else:
        r_dic[t] = s

print("Yes")

Failing test case input:
zyxwvutsrqpnnmlkjihgfedcba
unomzpgwdtsjxlcvakerfqhybi

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys

S = input()
T = input()

r_dic = {}
s_dic = {}
for i in range(len(S)):
    s = S[i]
    t = T[i]
    
    

    if(t in r_dic and r_dic[t] != s):
        print("No")
        sys.exit()
    else:
        r_dic[t] = s

    if(s in s_dic and s_dic[s] != t):
        print("No")
        sys.exit()
    else:
        s_dic[s] = t

print("Yes")
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
c2pos=dict()
for ix, c in enumerate(T):
    if c2pos.get(c) == None:
        c2pos[c] = [ix]
    else:
        c2pos[c].append(ix)

res = "Yes"

for k, v in c2pos.items():
    if len(v) <= 1:
        continue

    if len(set([S[_v] for _v in v])) != 1:
        res = "No"
print(res)


Failing test case input:
elzza
apqle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()
c2pos=dict()
s_c2pos = dict()

for ix, c in enumerate(S):
    if s_c2pos.get(c) == None:
        s_c2pos[c] = [ix]
    else:
        s_c2pos[c].append(ix)

for ix, c in enumerate(T):
    if c2pos.get(c) == None:
        c2pos[c] = [ix]
    else:
        c2pos[c].append(ix)

res = "Yes"

for k, v in c2pos.items():
    if len(v) < 1:
        continue

    if len(set([S[_v] for _v in v])) != 1:
        res = "No"

    if s_c2pos[S[v[0]]] != v:
        res = "No"
    
print(res)

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
s=Counter(list(input()))
t=Counter(list(input()))
s,t=list(s.values()),list(t.values())
print("Yes" if s.sort()==t.sort() else "No")

Failing test case input:
abcdefghijklmnopqrstuvwxyz
unonzpgwdtskxlcvakerfqhybi

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import Counter
s=Counter(list(input()))
t=Counter(list(input()))
s,t=list(s.values()),list(t.values())
print("Yes" if sorted(s)==sorted(t) else "No")

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()
letters=[]
count=[]
for i in range(len(s)):
  if s[i] in letters:
    count[letters.index(s[i])].append(i)
  else:
    count.append([i])
    letters.append(s[i])
failflag=0
for i in count:
  r=t[i[0]]
  for j in i:
    if t[j]!=r:
      failflag=1
letters=[]
count=[]
for i in range(len(s)):
  if t[i] in letters:
    count[letters.index(t[i])].append(i)
  else:
    count.append([i])
    letters.append(t[i])
failflag=0
for i in count:
  r=s[i[0]]
  for j in i:
    if s[j]!=r:
      failflag=1
if failflag==0:
  print('Yes')
else:
  print('No')

Failing test case input:
zyxwvutsrqpnnmlkjihgfedcba
unomzpgwdtsjxlcvakerfqhybi

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s=input()
t=input()
letters=[]
count=[]
for i in range(len(s)):
  if s[i] in letters:
    count[letters.index(s[i])].append(i)
  else:
    count.append([i])
    letters.append(s[i])
failflag=0
for i in count:
  r=t[i[0]]
  for j in i:
    if t[j]!=r:
      failflag=1
letters=[]
count=[]
for i in range(len(s)):
  if t[i] in letters:
    count[letters.index(t[i])].append(i)
  else:
    count.append([i])
    letters.append(t[i])
for i in count:
  r=s[i[0]]
  for j in i:
    if s[j]!=r:
      failflag=1
if failflag==0:
  print('Yes')
else:
  print('No')
Problem: p03252
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():


    s = S()
    t = S()
    
    dic = collections.defaultdict(str)
    
    for i in range(len(s)):
        if dic[t[i]] == "":
            dic[t[i]] = s[i]
        else:
            if dic[t[i]] != s[i]:
                print("No")
                exit(0)
    
    print("Yes")

main()


Failing test case input:
azzel
aople

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():


    s = S()
    t = S()
    
    dic1 = collections.defaultdict(str)
    dic2 = collections.defaultdict(str)
    
    for i in range(len(s)):
        if dic1[t[i]] == "":
            dic1[t[i]] = s[i]
        else:
            if dic1[t[i]] != s[i]:
                print("No")
                exit(0)

        if dic2[s[i]] == "":
            dic2[s[i]] = t[i]
        else:
            if dic2[s[i]] != t[i]:
                print("No")
                exit(0)
        
    print("Yes")

main()

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()

a = [[0 for _ in range(26)] for _ in range(26)]
for i, j in zip(s, t):
    a[ord(j) - 97][ord(i) - 97] = 1

for i in a:
    if sum(i) >= 2:
        print("No")
        exit()
print("Yes")

Failing test case input:
azzle
apqle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
t = input()

a = [[0 for _ in range(26)] for _ in range(26)]
b = [[0 for _ in range(26)] for _ in range(26)]
for i, j in zip(s, t):
    a[ord(i) - 97][ord(j) - 97] = 1
    b[ord(j) - 97][ord(i) - 97] = 1

for i, j in zip(a, b):
    if sum(i) >= 2 or sum(j) >= 2:
        print("No")
        exit()
print("Yes")
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def c_string_transformation(S, T):
    from collections import defaultdict
    c = defaultdict(str)
    for k, (c1, c2) in enumerate(zip(S, T)):
        if c1 not in c[c2]:
            c[c2] += c1
    ans = 'Yes'
    for _, v in c.items():
        if len(v) >= 2:
            ans = 'No'
            break
    return ans

S = input()
T = input()
print(c_string_transformation(S, T))

Failing test case input:
azzle
apqld

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def c_string_transformation(S, T):
    from collections import defaultdict
    cs = defaultdict(str)
    ct = defaultdict(str)
    for k, (c1, c2) in enumerate(zip(S, T)):
        if c1 not in cs[c2]:
            cs[c2] += c1
        if c2 not in ct[c1]:
            ct[c1] += c2
    ans = 'Yes'
    for _, v in cs.items():
        if len(v) >= 2:
            ans = 'No'
            break
    for _, v in ct.items():
        if len(v) >= 2:
            ans = 'No'
            break
    return ans

S = input()
T = input()
print(c_string_transformation(S, T))

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

s = list(input())
t = list(input())

l='abcdefghijklmnopqrstuvwxyz'

for item in l:
    can = [i for i, x in enumerate(t) if x == item]
    if len(can) > 1:
        d = []
        for i in can:
            d.append(s[i])
        if len(set(d)) != 1:
            print('No')
            exit()
print('Yes')


Failing test case input:
azzle
apqle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

s = list(input())
t = list(input())

l='abcdefghijklmnopqrstuvwxyz'

for item in l:
    can = [i for i, x in enumerate(t) if x == item]

    if len(can) > 1:
        d = [s[i] for i in can]
        if len(set(d)) != 1:
            print('No')
            exit()
for item in l:
    can = [i for i, x in enumerate(s) if x == item]

    if len(can) > 1:
        d = [t[i] for i in can]
        if len(set(d)) != 1:
            print('No')
            exit()
print('Yes')
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import string

S = input()
T = input()

count1 = [0] * 26
count2 = [0] * 26


for j in range(26):
    count1[j] = S.count(string.ascii_lowercase[j])
    count2[j] = T.count(string.ascii_lowercase[j])

hantei = 1

for i in range(0,len(S)+1):
    count_tmp1 = 0
    count_tmp2 = 0
    for j in range(26):
        if i == count1[j] :
            count_tmp1 += 1
    for j in range(26):
        if i == count2[j] :
            count_tmp2 += 1
    if count_tmp1 != count_tmp2:
        print(count_tmp1,count_tmp2,i)
        hantei = 0
        break

if hantei == 0:
    print("No")
else:
    print("Yes")


Failing test case input:
abcdefgiijklmzopqrstuvwxyn
ibyhqfuekavclxkstdwgpznonr

Expected output:
No


Actual output:
1 2 0
No


Fixed submission (verdict: Accepted):
import string

S = input()
T = input()

count1 = [0] * 26
count2 = [0] * 26


for j in range(26):
    count1[j] = S.count(string.ascii_lowercase[j])
    count2[j] = T.count(string.ascii_lowercase[j])

hantei = 1

for i in range(0,len(S)+1):
    count_tmp1 = 0
    count_tmp2 = 0
    for j in range(26):
        if i == count1[j] :
            count_tmp1 += 1
    for j in range(26):
        if i == count2[j] :
            count_tmp2 += 1
    if count_tmp1 != count_tmp2:
        hantei = 0
        break

if hantei == 0:
    print("No")
else:
    print("Yes")

Problem: p03252
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import defaultdict
s = input()
t = input()

st = defaultdict(lambda :0)
for x, y in zip(s,t):
    if st[y] != 0 and st[y] != x:
        print('No')
        exit()
    st[y] = x
    st[x] = y
print('Yes')

Failing test case input:
azyle
dlqpa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import defaultdict
s = input()
t = input()

st = defaultdict(lambda :0)
for x, y in zip(s,t):
    if (st[(y, 1)] != 0 and st[(y, 1)] != x) or (st[(x, 0)] != 0 and st[(x, 0)] != y):
        
        print('No')
        exit()
    st[(y, 1)] = x
    st[(x, 0)] = y

print('Yes')

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
dic = {}

for i in range(len(a)):
  if not b[i] in dic:
    dic[b[i]] = a[i]
  else:
    if dic[b[i]] != a[i]:
      print("No")
      quit()
  
print("Yes")

Failing test case input:
azzle
dlqpa

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a = input()
b = input()
dic = {}

for i in range(len(a)):
  if not b[i] in dic:
    dic[b[i]] = a[i]
  else:
    if dic[b[i]] != a[i]:
      print("No")
      quit()
  
c = list(dic.values())
d = set(c)


if len(c) == len(d):
  print("Yes")
else:
  print("No")
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1 = input()
s2 = input()
dic = {}
for i in range(len(s1)):
    if not s1[i] in dic:
        dic[s1[i]] = s2[i]
if len(dic) != len(set(dic.values())):
    print('No')
else:
    print('Yes')

Failing test case input:
azzle
apqle

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s1 = input()
s2 = input()
dic = {}
for i in range(len(s1)):
    if not s1[i] in dic:
        dic[s1[i]] = s2[i]
    else:
        if dic[s1[i]] != s2[i]:
            print('No')
            quit()

if len(dic) != len(set(dic.values())):
    print('No')
else:
    print('Yes')

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import string

S = input()
T = input()

count1 = [0] * 26
count2 = [0] * 26


for j in range(25):
    count1[j] = S.count(string.ascii_lowercase[j])
    count2[j] = T.count(string.ascii_lowercase[j])

hantei = 1

for i in range(1,len(S)+1):
    count_tmp1 = 0
    count_tmp2 = 0
    for j in range(25):
        if i == count1[j] :
            count_tmp1 += 1
        elif i == count2[j] :
            count_tmp2 += 1
    if count_tmp1 != count_tmp2:
        hantei = 0
        break

if hantei == 0:
    print("No")
else:
    print("Yes")

Failing test case input:
abcdefghijklmnopqrstuvwxyz
unomzpgwdtsjxlcvakerfqhybi

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import string

S = input()
T = input()

count1 = [0] * 26
count2 = [0] * 26


for j in range(26):
    count1[j] = S.count(string.ascii_lowercase[j])
    count2[j] = T.count(string.ascii_lowercase[j])

hantei = 1

for i in range(0,len(S)+1):
    count_tmp1 = 0
    count_tmp2 = 0
    for j in range(26):
        if i == count1[j] :
            count_tmp1 += 1
    for j in range(26):
        if i == count2[j] :
            count_tmp2 += 1
    if count_tmp1 != count_tmp2:
        hantei = 0
        break

if hantei == 0:
    print("No")
else:
    print("Yes")

Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

n = len(S)
c1s = {}
c2s = {}
ans = True
for i in range(n):
    if not ans:
        break

    if S[i] in c1s:
        if c1s[S[i]] != T[i]:
            ans = False
            break
    else:
        c1s[S[i]] = S[i]
    if T[i] in c2s:
        if c2s[T[i]] != S[i]:
            ans = False
            break
    else:
        c2s[T[i]] = T[i]


print('Yes' if ans else 'No')



Failing test case input:
azzle
appld

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()

n = len(S)
c1s = {}
c2s = {}
ans = True
for i in range(n):
    if not ans:
        break

    if S[i] in c1s:
        if c1s[S[i]] != T[i]:
            ans = False
            break
    else:
        c1s[S[i]] = T[i]
    if T[i] in c2s:
        if c2s[T[i]] != S[i]:
            ans = False
            break
    else:
        c2s[T[i]] = S[i]


print('Yes' if ans else 'No')
Problem: p03252
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
import fractions

s = stdin.readline().rstrip()
t = stdin.readline().rstrip()
sli = []
li = []
for i in range(len(s)):
    sli.append(s[i])
    if s[i] != t[i]:
        li.append((s[i],t[i]))
li.sort()
sli = list(set(sli))

for i in range(len(li)-1):
    if li[i][0] == li[i+1][0]:
        if li[i][1] != li[i+1][1]:
            print("No")
            exit()
    if li[i][1] not in sli:
        print("No")
        exit()

li.sort(key=lambda x:(x[1]))

for i in range(len(li)-1):
    if li[i][0] != li[i+1][0]:
        if li[i][1] == li[i+1][1]:
            print("No")
            exit()

print("Yes")

Failing test case input:
ayzel
apqle

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from sys import stdin
import fractions

s = stdin.readline().rstrip()
t = stdin.readline().rstrip()

li = []
for i in range(len(s)):
    li.append((s[i],t[i]))
li.sort()

for i in range(len(li)-1):
    if li[i][0] == li[i+1][0]:
        if li[i][1] != li[i+1][1]:
            print("No")
            exit()

li.sort(key=lambda x:(x[1]))

for i in range(len(li)-1):
    if li[i][0] != li[i+1][0]:
        if li[i][1] == li[i+1][1]:
            print("No")
            exit()

print("Yes")
Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()
d = 1 if a%2==0 or b%2==0 else 0
print(['YES','NO'][d])

Failing test case input:
5 -3

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()
d = 1 if a%2==0 or b%2==0 else 0
print(['Yes','No'][d])

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())

if ((a*b)  % 2) == 0:
  print('NO')
else:
  print('Yes')

Failing test case input:
-12 -2

Expected output:
No


Actual output:
NO


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

if ((a*b)  % 2) == 0:
  print('No')
else:
  print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = (int(i) for i in input().split())
if A % 2 == 0 and B % 2 == 0:
    print('Yes')
else:
    print('No')

Failing test case input:
-7 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
A, B = (int(i) for i in input().split())
if A % 2 == 0 or B % 2 == 0:
    print('No')
else:
    print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print("Yes" if a % 2 == 1 and b % 2 == 0 else "No")


Failing test case input:
5 -3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print("Yes" if a % 2 == 1 and b % 2 == 1 else "No")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

if a % 2 == 0 | b % 2 == 0:
    print('No')
else:
    print('Yes')

Failing test case input:
15 -2

Expected output:
No


Actual output:
Yes


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

if a % 2 == 0 or b % 2 == 0:
    print('No')
else:
    print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=(int(x) for x in input().split())
if (a*b) % 2 == 0:
  print('NO')
else:
  print('YES')
  

Failing test case input:
-12 -2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b=(int(x) for x in input().split())
if (a*b) % 2 == 0:
  print('No')
else:
  print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if a % 2 != 0 or b % 2 != 0:
    print("Yes")
else:
    print("No")


Failing test case input:
23 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a % 2 != 0 and b % 2 != 0:
    print("Yes")
else:
    print("No")
Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())

if(A%2==0 and B%2==0):
  print("No")
else:
  print("Yes")

Failing test case input:
23 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())

if(A%2!=0 and B%2!=0):
  print("Yes")
else:
  print("No")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a , b = map(int , input().split())
if a * b % 2 == 0 :
    print("Yes")
else :
    print("No")

Failing test case input:
-7 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a , b = map(int , input().split())
if a * b % 2 == 0 :
    print("No")
else :
    print("Yes")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def input():
    return sys.stdin.readline()[:-1]
A,B = map(int,input().split(' '))
if (A*B)%2:
    print('No')
else:
    print('Yes')

Failing test case input:
15 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
def input():
    return sys.stdin.readline()[:-1]
A,B = map(int,input().split(' '))
if (A*B)%2:
    print('Yes')
else:
    print('No')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = input().split()
print("No" if '2' in a and "2" in b else "Yes")

Failing test case input:
-9 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b = input().split()
print("No" if '2' in a or "2" in b else "Yes")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if(a * b % 2 == 0):
    print("Yes")
else:
    print("No")

Failing test case input:
-9 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if(a * b % 2 == 0):
    print("No")
else:
    print("Yes")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def is_even(num):
    return num % 2 == 0

A, B = map(int, input().split())

for C in range(1, 4):
    if is_even(A*B*C):
        print('Yes')
        
        exit()

print('No')

Failing test case input:
15 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def is_even(num):
    return num % 2 == 0

A, B = map(int, input().split())

for C in range(1, 3):
    if not is_even(A*B*C):
        print('Yes')
        
        exit()

print('No')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


A,B=map(int,input().split())
while True:
    for i in range(1,4):
        if A*B*i%2==1:
            print('Yes')
            break
    print('No')
    break

Failing test case input:
-7 1

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):


A,B=map(int,input().split())
def mon(A,B):
    while True:
        for i in range(1,4):
            if A*B*i%2==1:
                return 'Yes'
                break
        return 'No'
        break

print(mon(A,B))
Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())

if a%2 == 0 and b%2 == 0:
  print("No")
else:
  print("Yes")

Failing test case input:
-9 -2

Expected output:
No


Actual output:
Yes


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

if a%2 == 0 or b%2 == 0:
  print("No")
else:
  print("Yes")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if (a * b) % 2 == 0:
  print('Yes')
else:
  print('No')

Failing test case input:
-12 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if (a * b) % 2 == 0:
  print('No')
else:
  print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split(' '))
if a*b%2:
  print('No')
else:
  print('Yes')
 

Failing test case input:
-9 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b = map(int,input().split(' '))
if a*b%2==0:
  print('No')
else:
  print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import functools
import math

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper



a, b = inl()
ok = False
for c in range(1, 4):
    if c* a * b  in [1, 3]:
        ok = True
print('Yes' if ok else 'No')


Failing test case input:
-7 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import functools
import math

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper



a, b = inl()
ok = False
for c in range(1, 4):
    if c* a * b %2 == 1:
        ok = True
print('Yes' if ok else 'No')
Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if a * b % 2 == 0:
  print('NO')
else:
  print('YES')

Failing test case input:
-12 -2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a * b % 2 == 0:
  print('No')
else:
  print('Yes')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())
print("No" if a % 2 == 0 and b % 2 == 0 else "Yes")

Failing test case input:
23 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
print("No" if a % 2 == 0 or b % 2 == 0 else "Yes")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = [int(x) for x in input().split()]
if ((x*y*1)/2 != 0) or ((x*y*3)/2 != 0):
  print('Yes')
else:
  print('No')
  

Failing test case input:
-9 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
x, y = [int(x) for x in input().split()]
if (x%2 != 0) and (y%2 != 0):
  print('Yes')
else:
  print('No')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = [int(i) for i in input().split()]
if a%2==0 and b%2==0:
  print('Yes')
else:
  print('No')

Failing test case input:
-12 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b = [int(i) for i in input().split()]
if a%2==1 and b%2==1:
  print('Yes')
else:
  print('No')

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if (a*b)%2==1:
    print("Yws")
else:
    print("No")


Failing test case input:
7 -3

Expected output:
Yes


Actual output:
Yws


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if (a*b)%2==1:
    print("Yes")
else:
    print("No")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
number = input().rstrip().split(" ")
A = number[0]
B = number[1]
seki = int(A) * int(B)
if seki % 2 == 0:
  print("no")
else:
  print("yes")

Failing test case input:
-9 -2

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
number = input().rstrip().split(" ")
A = number[0]
B = number[1]
seki = int(A) * int(B)
if seki % 2 == 0:
  print("No")
else:
  print("Yes")

Problem: p03260
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = map(int, input().split())
if A * B <= 3 and A * B != 2:
  print("Yes")
else:
  print("No")

Failing test case input:
23 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
if A*B%2:
  print("Yes")
else:
  print("No")

Problem: p03260
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
if (a * b) % 2 == 0:
    print("NO")
else:
    print("YES")

Failing test case input:
-9 -2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
if (a * b) % 2 != 0:
    print("Yes")
else:
    print("No")