ZhenlongDai/ACPR huggingface dataset:
Problem: p03486
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s=[i for i in input()]
t=[i for i in input()]

s.sort()
t.sort(reverse=True)
s=''.join(s)
t=''.join(t)
l=[s,t]
l2=[s,t]
if l==l2:
  print('Yes')
else:
  print('No')

Failing test case input:
w
vq

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s=[i for i in input()]
t=[i for i in input()]
if s==t:
  print('No')
else:
  s=sorted(s)
  t=sorted(t,reverse=True)
  s=''.join(s)
  t=''.join(t)
  l=[s,t]
  l2=sorted(l)
  if l==l2:
    print('Yes')
  else:
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
if sorted(a) < list(reversed(b)):
  print("Yes")
else:
  print("No")

Failing test case input:
yy
yzc

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = input()
b = input()
if sorted(a) < sorted(b)[::-1]:
  print("Yes")
else:
  print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
ss = sorted(s)
tt = sorted(t,reverse=True)
for n, w in zip(ss,tt):
  if n < w:
    print("Yes")
    exit()
  elif n > w:
    print("No")
    exit()
if len(ss) > len(tt):
  print("No")
else:
  print("Yes")

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
t = input()
ss = sorted(s)
tt = sorted(t,reverse=True)
for n, w in zip(ss,tt):
  if n < w:
    print("Yes")
    exit()
  elif n > w:
    print("No")
    exit()
if len(ss) >= len(tt):
  print("No")
else:
  print("Yes")

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

import sys

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

if len(s) < len(t):
    t2 = t.copy()
    for l in s:
        if l in t2:
            del t2[t2.index(l)]
        else:
            break
    else:
        print('yes')
        sys.exit()

s.sort()
t.sort()

if s[0] < t[-1]:
    print ('yes')
    sys.exit()
    
print('no')


Failing test case input:
cd
abc

Expected output:
No

Actual output:
no


Fixed submission (verdict: Accepted):

import sys

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

if len(s) < len(t):
    t2 = t.copy()
    for l in s:
        if l in t2:
            del t2[t2.index(l)]
        else:
            break
    else:
        print('Yes')
        sys.exit()

s.sort()
t.sort()

if s[0] < t[-1]:
    print ('Yes')
    sys.exit()
    
print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().rstrip('\r')
t = input().rstrip('\r')
s = "".join(sorted(s))
t = "".join(sorted(t))
if s < t:
    print('Yes')
else:
    print('No')

Failing test case input:
eaobtcs
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = input().rstrip('\r')
t = input().rstrip('\r')
s = "".join(sorted(s))
t = "".join(sorted(t, reverse=True))
if s < t:
    print('Yes')
else:
    print('No')
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = ''.join(sorted(list(input()), reverse=True))
t = ''.join(sorted(list(input()), reverse=True))

check_box = sorted([s, t])

if s == check_box[0]:
    print('Yes')
else:
    print('No')

Failing test case input:
scuboae
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

if s < t:
    print('Yes')
else:
    print('No')

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

s.sort()
t.sort()
t.reverse()

for S,T in zip(s,t):
	if 'S' == 'T':
		continue

	elif ord(S) < ord(T):
		print("Yes")
		exit(0)

	else :
		print("No") 
		exit(0)

if len(S) < len(T):
	print("Yes")

else:
	print("No")

Failing test case input:
w
uw

Expected output:
Yes


Actual output:
No


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

s.sort()
t.sort()
t.reverse()

for S,T in zip(s,t):
	if 'S' == 'T':
		continue

	elif ord(S) < ord(T):
		print("Yes")
		exit(0)

	elif ord(T) < ord(S):
		print("No") 
		exit(0)

if len(s) < len(t):
	print("Yes")

else:
	print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
m=[a[i] for i in range(len(a))]
b=input()
n=[b[i] for i in range(len(b))]
m.sort()
n.sort(reverse=1)
i=0
while 1>0:
  if i==len(b):
    print("No")
    break
  if i==len(a):
    print("Yes")
    break
  if m[i]<n[i]:
    print("Yes")
    break
  i+=1

Failing test case input:
z
vv

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a=input()
m=[a[i] for i in range(len(a))]
b=input()
n=[b[i] for i in range(len(b))]
m.sort()
n.sort(reverse=1)
i=0
while 1>0:
  if i==len(b):
    print("No")
    break
  if i==len(a):
    print("Yes")
    break
  if m[i]<n[i]:
    print("Yes")
    break
  if m[i]>n[i]:
    print("No")
    break
  i+=1

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()

c = ''.join(sorted(a))
d = ''.join(sorted(b, reverse=True))

if c < d:
  print("Yes")
else:
  print("No")

print(c)
print(d)

Failing test case input:
{yy
x||

Expected output:
Yes


Actual output:
Yes
yy{
||x


Fixed submission (verdict: Accepted):
a = input()
b = input()

c = ''.join(sorted(a))
d = ''.join(sorted(b, reverse=True))

if c < d:
  print("Yes")
else:
  print("No")

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

s = input()
t = input()
re_s = sorted(s, reverse=True)
re_t = sorted(t, reverse=True)
print("Yes" if re_s < re_t else "No")

Failing test case input:
oaebucs
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

s = input()
t = input()
re_s = sorted(s)
re_t = sorted(t, reverse=True)
print("Yes" if re_s < re_t else "No")
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()
s_list=[s[i] for i in range(len(s))]
t_list=[t[j] for j in range(len(t))]
s_list.sort()
t_list.reverse()
ss=""
for k in range(len(s_list)):
    ss+=s_list[k]
tt=""
for l in range(len(t_list)):
    tt+=t_list[l]
if ss<tt:
    print("Yes")
else:
    print("No")

Failing test case input:
yx
yzb

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=input()
t=input()
s_list=[s[i] for i in range(len(s))]
t_list=[t[j] for j in range(len(t))]
s_list.sort()
t_list.sort(reverse=True)
ss=""
for k in range(len(s_list)):
    ss+=s_list[k]
tt=""
for l in range(len(t_list)):
    tt+=t_list[l]
if ss<tt:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s = list(map(str, input()))
t = list(map(str, input()))
if ''.join(sorted(s)) < ''.join(reversed(t)):
    print('Yes')
else:
    print('No')


Failing test case input:
yyy
{{x

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
if ''.join(sorted(input())) < ''.join(sorted(input(), reverse=True)):
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
t=list(input())
s.sort()
t.sort(reverse=True)
strs="".join(s)
strt="".join(t)
list1=[strs,strt]
str1=list1[0]
list1.sort()
if str1==list1[0]:
    print("Yes")
else:
    print("No")


Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s=list(input())
t=list(input())
s.sort()
t.sort(reverse=True)
strs="".join(s)
strt="".join(t)
list1=[strs,strt]
str1=list1[0]
list1.sort()
if s==t:
    print("No")
elif str1==list1[0]:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import defaultdict

def main():
    a = list(input())
    a.sort()
    a = ''.join(a)
    b = list(input())
    b.sort(reverse=True)
    b = ''.join(b)
    ans = [a, b]
    ans .sort()
    
    if ans[0] == a:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


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

def main():
    a = list(input())
    a.sort()
    a = ''.join(a)
    b = list(input())
    b.sort(reverse=True)
    b = ''.join(b)
    ans = [a, b]
    ans .sort()
    
    if ans[0] == b:
        print('No')
    else:
        print('Yes')

if __name__ == '__main__':
    main()

Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
s_n = ''.join(sorted(s))

t = input()
t_n = ''.join(sorted(t,reverse = True))

if s_n > t_n:
  print('No')

else:
  print('Yes')
  

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
s_n = ''.join(sorted(s))

t = input()
t_n = ''.join(sorted(t,reverse = True))

if s_n < t_n:
  print('Yes')

else:
  print('No')
Problem: p03486
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):



def main():
    s = list(input())
    t = list(input())
    s.reverse()
    t.reverse()
    l = len(s)
    tl = len(t)
    if l > tl:
        l = tl
    for i in range(l):
        if s[i] == t[i]:
            continue
        if t[i] > s[i]:
            print("Yes")
            return
        print("No")
        return
    if l != tl:
        print("Yes")
        return
    print("No")


if __name__ == "__main__":
    main()


Failing test case input:
yyy
{zx

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



def main():
    s = list(input())
    t = list(input())
    s.sort()
    t.sort(reverse=True)
    l = len(s)
    tl = len(t)
    if l > tl:
        l = tl
    for i in range(l):
        if s[i] == t[i]:
            continue
        if t[i] > s[i]:
            print("Yes")
            return
        print("No")
        return
    if l == tl:
        print("No")
        return
    print("Yes")


if __name__ == "__main__":
    main()

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s_input = input()
t_input = input()

s = list(s_input)
t = list(t_input)

s_sort = sorted(s)
t_sort = sorted(t)

R=0
P=0
for i in range(0, len(s)):
    for j in range(0, len(t)):
        if(s[i]==t[j]):
            P+=1
            break
        if(s[i] < t[j]):
            R=1
            break

if(P==len(s) and len(s)<len(t)):
    R=0

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


Failing test case input:
zzy
{xz

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s_input = input()
t_input = input()

s = list(s_input)
t = list(t_input)

s.sort()
t.sort(reverse=True)

if(len(s)<=len(t)):
    l = len(s)
else:
    l = len(t)

R = 0
P = 0
for i in range(0, l):
    if(s[i] == t[i]):
        P+=1
    elif(s[i] < t[i]):
        break
    else:
        R=1

if(P==l):
    if(len(s)<len(t)):
        R=0
    else:
        R=1

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

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(map(str, input()))
t = list(map(str, input()))

ans = False

for _s in s:
    for _t in t:
        if _t > _s:
            ans = True

for _s in s:
    for _t in t:
        if _t == _s:
            if len(t) > len(s):
                ans = True

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


Failing test case input:
cd
bac

Expected output:
No


Actual output:
Yes


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

smax = max(s)
tmax = max(t)
smin = min(s)
tmin = min(t)

ans = False

if tmax > smin:
    ans = True
elif tmax < smax:
    ans = False
else:
    if len(t) > len(s):
        ans = True

if ans:
    print('Yes')
else:
    print('No')
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = sorted(input())
t = sorted(input(), reverse=True)
print(s)
print(t)
if s < t:
    print('Yes')
else:
    print('No')

Failing test case input:
v
tw

Expected output:
Yes


Actual output:
['v']
['w', 't']
Yes


Fixed submission (verdict: Accepted):
s = sorted(input())
t = sorted(input(), reverse=True)

if s < t:
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
b = list(input())


a.sort()
b.reverse()
a = ''.join(a)
b = ''.join(b)
if a < b:
    print('Yes')
else:
    print('No')

Failing test case input:
xy
xzb

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = list(input())
b = list(input())

a = ''.join(sorted(a))
b = ''.join(sorted(b,reverse=True))
if a < b:
    print('Yes')
else:
    print('No')

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

s.sort()
t.sort(reverse=True)

if s[0] < t[0]:
    print("Yes")
else:
    print("No")

Failing test case input:
w
uw

Expected output:
Yes


Actual output:
No


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

s.sort()
t.sort(reverse=True)
s = "".join(s)
t = "".join(t)

if s < t:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=list(input())
y=list(input())
x.sort();y.sort(reverse=True)
x=str(x);y=str(y)
if x<y:
  print('Yes')
else:
  print('No')


Failing test case input:
w
ww

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
x=list(input())
y=list(input())
x.sort();y.sort(reverse=True)
''.join(x);''.join(y)

if x<y:
  print('Yes')
else:
  print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
s = "".join(sorted(list(stdin.readline().rstrip())))
t = "".join(sorted(list(stdin.readline().rstrip())))
if s < t:
    print("Yes")
else:
    print("No")

Failing test case input:
eaobtds
salta

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from sys import stdin
s = "".join(sorted(list(stdin.readline().rstrip())))
t = "".join(reversed((sorted(list(stdin.readline().rstrip())))))
if s < t:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())
s.sort()
t.reverse()
if s < t:
    print("Yes")
else:
    print("No")

Failing test case input:
ratcode
salt`

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())
s = ''.join(sorted(s))
t = ''.join(sorted(t,reverse = True))
if s < t:
    print("Yes")
else:
    print("No")
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = sorted(list(input()))
t = sorted(list(input()))
s_sorted = "".join(s)
t_sorted = "".join(t)

if s_sorted < t_sorted:
    print("Yes")
else:
    print("No")



Failing test case input:
xy
bzy

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = sorted(list(input()))
t = sorted(list(input()), reverse=True)
s_sorted = "".join(s)
t_sorted = "".join(t)


if s_sorted < t_sorted:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
try:
    s = input()
    t = input()
    s_ = sorted(s)
    t_ = sorted(t, reverse=True)
    print(s_)
    print(t_)
    print('Yes' if s_<t_ else 'No')
except EOFError:
    pass

Failing test case input:
yyy
{{x

Expected output:
Yes


Actual output:
['y', 'y', 'y']
['{', '{', 'x']
Yes


Fixed submission (verdict: Accepted):
try:
    s = input()
    t = input()
    s_ = sorted(s)
    t_ = sorted(t, reverse=True)
    print('Yes' if s_<t_ else 'No')
except EOFError:
    pass

Problem: p03486
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):



def main():
    s = list(input())
    t = list(input())
    s.reverse()
    t.reverse()
    sl = len(s)
    tl = len(t)
    l = tl if sl > tl else sl
    for i in range(l):
        if s[i] == t[i]:
            continue
        if t[i] > s[i]:
            print("Yes")
            return
        print("No")
        return
    if sl < tl:
        print("Yes")
        return
    print("No")


if __name__ == "__main__":
    main()


Failing test case input:
yy
yzc

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



def main():
    s = list(input())
    t = list(input())
    s.sort()
    t.sort(reverse=True)
    l = len(s)
    tl = len(t)
    if l > tl:
        l = tl
    for i in range(l):
        if s[i] == t[i]:
            continue
        if t[i] > s[i]:
            print("Yes")
            return
        print("No")
        return
    if l == tl:
        print("No")
        return
    print("Yes")


if __name__ == "__main__":
    main()

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=open(0);print("YNeos"["".join(sorted(s[:-1]))>="".join(sorted(t,reverse=True))::2])

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s,t=open(0);print("YNeos"["".join(sorted(s[:-1]))>="".join(sorted(t.strip(),reverse=True))::2])

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

s = sorted(s)
t = list(reversed(t))

s = ''.join(s)
t = ''.join(t)
if s<t:
    print('Yes')
else:
    print('No')

Failing test case input:
zyy
|{x

Expected output:
Yes


Actual output:
No


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

s = ''.join(sorted(s))
t = ''.join(sorted(t, reverse=True))

if s<t:
    print('Yes')
else:
    print('No')
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()

s_sort = sorted(s,reverse=True)
t_sort = sorted(t,reverse= True)

if s_sort < t_sort:
    print('Yes')
else:
    print('No')

Failing test case input:
scuboae
atlat

Expected output:
Yes


Actual output:
No


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

s_sort = sorted(s)
t_sort = sorted(t,reverse= True)

if s_sort < t_sort:
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
if sorted(s, reverse=True) < sorted(t, reverse=True):
    print("Yes")
else:
    print("No")


Failing test case input:
eaobtds
salta

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
if "".join(sorted(s)) < "".join(sorted(t, reverse=True)):
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = sorted(input())[::-1]
b = sorted(input())
if a < b:
    print("Yes")
else:
    print("No")



Failing test case input:
zyz
{zx

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = sorted(input())
b = sorted(input())[::-1]
if a < b:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
t=input()

u=sorted([s])
v=sorted([t],reverse=True)

print("Yes" if u<v else "No")

Failing test case input:
v
qw

Expected output:
Yes


Actual output:
No


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

u=sorted(s)
v=sorted(t,reverse=True)

print("Yes" if u<v else "No")

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

s.sort(reverse=True)
t.sort(reverse=True)

if(s < t):
    print('Yes')
else:
    print('No')

Failing test case input:
ocfbu`s
atlat

Expected output:
Yes


Actual output:
No


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

s.sort()
t.sort(reverse=True)

if(s < t):
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = "".join(sorted(list(input())))
t = "".join(reversed(list(input())))

if s < t: print("Yes")
else: print("No")

Failing test case input:
v
wq

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = "".join(sorted(input()))
t = "".join(sorted(input(), reverse=True))

if s < t: print("Yes")
else: print("No")
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
m=[a[i] for i in range(len(a))]
b=input()
n=[b[i] for i in range(len(b))]
m.sort()
n.sort()
i=0
while 1>0:
  if m[i]<n[i]:
    print("Yes")
    break
  i+=1
  if i==len(a) or i==len(b):
    print("No")
    break

Failing test case input:
xy
xzb

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a=input()
m=[a[i] for i in range(len(a))]
b=input()
n=[b[i] for i in range(len(b))]
m.sort()
n.sort(reverse=1)
i=0
while 1>0:
  if i==len(b):
    print("No")
    break
  if i==len(a):
    print("Yes")
    break
  if m[i]<n[i]:
    print("Yes")
    break
  if m[i]>n[i]:
    print("No")
    break
  i+=1

Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
b=input()
la,lb = len(a), len(b)
if a==b:    print('No')
elif (la< lb and set(a)==set(b)):
    print('Yes')
else:
    sa = sorted(a, reverse=True)
    if (sa[:lb] < sorted(b, reverse = True)):
        print('Yes')
    else:
        print('No')

Failing test case input:
ocfbu`s
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a=input()
b=input()
la,lb = len(a), len(b)
if a==b:
    print('No')
elif (la< lb and set(a)==set(b)):
    print('Yes')
else:
    sa = sorted(a)
    sb = sorted(b, reverse = True)
    if (sa[:lb] < sb):
        print('Yes')
    else:
        print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
t=list(input())
s.sort()
t.sort()
t.reverse()
if s<t:
    print("yes")
else:
    print("no")

Failing test case input:
sdtboae
atlas

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
s=list(input())
t=list(input())
s.sort()
t.sort()
t.reverse()
if s<t:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
b = list(input())

a.sort()
b.sort(reverse=True)

a = "".join(a)
b = "".join(b)

print("Yes" if list(sorted((a, b)))[0] == a else "No")


Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
a = list(input())
b = list(input())

a.sort()
b.sort(reverse=True)

a = "".join(a)
b = "".join(b)

print("Yes" if a < b else "No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = sorted(input())
t = sorted(input())[::-1]
print("Yes" if s < t else "No")
print(s)
print(t)


Failing test case input:
yx
yzb

Expected output:
Yes


Actual output:
Yes
['x', 'y']
['z', 'y', 'b']


Fixed submission (verdict: Accepted):
s = sorted(input())
t = sorted(input())[::-1]
print("Yes" if s < t else "No")
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
d=input()
v=sorted(list(map(str,s)))
w=sorted(list(map(str,d)),reverse=True)
a=""
b=""
for i in range(len(s)):
  a += v[i]
for c in range(len(d)):
  b += w[c]
print("Yes") if max([a,b])==b else print("No")

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s=input()
d=input()
v=sorted(list(map(str,s)))
w=sorted(list(map(str,d)),reverse=True)
a=""
b=""
for i in range(len(s)):
  a += v[i]
for c in range(len(d)):
  b += w[c]
if a==b:
  print("No")
else:
  print("Yes") if max([a,b])==b else print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = ''.join(sorted(list(input()), reverse=True))
t = ''.join(sorted(list(input())))

if s < t:
    print('Yes')
else:
    print('No')

Failing test case input:
zyy
{{x

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

if s < t:
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input()).sort()
t = list(input()).sort(reverse=True)
 
if str(s) < str(t):
  print("Yes")
else:
  print("No")

Failing test case input:
xx
yxa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = sorted(input())
t = sorted(input(),reverse = True)

if "".join(s) < "".join(t):
  print("Yes")
else:
  print("No")

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

s2="".join(sorted(s,reverse=False))
t2="".join(sorted(t,reverse=True))

if s < t:
  print("Yes")
else:
  print("No")

Failing test case input:
eaobtcs
atlat

Expected output:
Yes


Actual output:
No


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

s2="".join(sorted(s,reverse=False))
t2="".join(sorted(t,reverse=True))

if s2 < t2:
  print("Yes")
else:
  print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())
s.sort()
t.reverse()
s = ''.join(s)
t = ''.join(t)
if s < t:
    print('Yes')
else:
    print('No')

Failing test case input:
zyy
{zx

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())
s.sort()
t.sort(reverse=True)
if s < t:
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=sorted(str(input()))
t=sorted(str(input()),reverse=True)
if s<=t:
  print('Yes')
else:
  print('No')

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s=sorted(str(input()))
t=sorted(str(input()),reverse=True)
if s<t:
  print('Yes')
else:
  print('No')
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

line1 = sys.stdin.readline()
line2 = sys.stdin.readline()

line1 = line1.replace('\n', '')
line2 = line2.replace('\n', '')

line1 = sorted(line1)
line2 = sorted(line2, reverse=True)

flag = 0
for x, y in zip(line1, line2):
    if x < y:
        flag = 1
    elif x == y:
        flag = 2
    else:
        flag = 3

if flag == 1:
    print('Yes')
elif flag == 2 and len(line1) < len(line2):
    print('Yes')
else:
    print('No')


Failing test case input:
zzy
{xz

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys

line1 = sys.stdin.readline()
line2 = sys.stdin.readline()

line1 = line1.replace('\n', '')
line2 = line2.replace('\n', '')

line1 = sorted(line1)
line2 = sorted(line2, reverse=True)




flag = 0
if len(line1) < len(line2):
    flag = 1

if flag == 1:
    for x, y in zip(line1, line2):
        if x > y:
            flag = 0
            break
        elif x < y:
            flag = 1
            break

else:
    for x, y in zip(line1, line2):
        if x < y:
            print("Yes")
            flag = -1
            break

if flag == 1:
    print("Yes")
elif flag != -1:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = "".join(sorted(input()))
b = "".join(sorted(input())[::-1])
print("YES" if a < b else "NO" )

Failing test case input:
v
tw

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a = "".join(sorted(input()))
b = "".join(sorted(input())[::-1])
print("Yes" if a < b else "No" )

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

s_a = ''.join(sorted(s))
t_a = ''.join(sorted(t))

if s_a < t_a :
    print('Yes')
else :
    print('No')


Failing test case input:
{zy
x{|

Expected output:
Yes


Actual output:
No


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

s_a = ''.join(sorted(s))
t_a = ''.join(sorted(t, reverse=True))
if s_a < t_a :
    print('Yes')
else :
    print('No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s2 = sorted(s)

t = input()
t2 = sorted(t, reverse=True)

for (i,j) in zip(s2,t2):
    if s == t:
        print("Yes")
        break
    if i < j:
        print("yes")
        break
    else:
        print("no")
        break

Failing test case input:
scuboae
atlat

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
scara = input()
s= sorted(scara)
tcar = input()
t= sorted(tcar, reverse=True)

for i, j in zip(s, t):
  if i < j:
    print("Yes")
    break
  elif i > j:
    print("No")
    break
else:
        if len(s) < len(t):

            print("Yes")
        else:

            print("No")
Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = list(input())
s.sort()
print(s)
t = list(input())
t.sort(reverse =True)
print(t)
list1 = [s,t]
list1.sort()
if list1[0] == t:
  print('No')
else:
  print('Yes')

Failing test case input:
ratcode
atlas

Expected output:
Yes

Actual output:
['a', 'c', 'd', 'e', 'o', 'r', 't']
['t', 's', 'l', 'a', 'a']
Yes


Fixed submission (verdict: Accepted):
s = list(input())
s.sort()

t = list(input())
t.sort(reverse =True)

list1 = [s,t]
list1.sort()
if list1[0] == t:
  print('No')
else:
  print('Yes')

Problem: p03486
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

s = input()
t = input()


s_L = list(s)
t_L = list(t)

s_L = sorted(s_L)
t_L = sorted(t_L,reverse=True)

tmp = ["".join(s_L),"".join(t_L)]

tmp = sorted(tmp,reverse=True)
if tmp[0] == "".join(t_L):
    print("Yes")
else:
    print("No")

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):

s = input()
t = input()


s_L = list(s)
t_L = list(t)

s_L = sorted(s_L)
t_L = sorted(t_L,reverse=True)

s_L = "".join(s_L)
t_L = "".join(t_L)


if s_L < t_L:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    s = input()
    s_list = list(s)
    s_list.sort()

    t = input()
    t_list = list(t)
    t_list.sort()

    for i in range(0,min(len(s_list),len(t_list))):
        if s_list[i] < t_list[i]:
            print("Yes")
        else:
            print("No")
        return

    if len(s_list) < len(t_list):
        print("Yes")
    else:
        print("No")

    return

if __name__ == "__main__":
    main()


Failing test case input:
{yy
x||

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def main():
    s = input()
    s_list = list(s)
    s_list.sort()

    t = input()
    t_list = list(t)
    t_list.sort(reverse = True)

    for i in range(0,min(len(s_list),len(t_list))):
        if s_list[i] < t_list[i]:
            print("Yes")
            return
        elif s_list[i] > t_list[i]:
            print("No")
            return

    if len(s_list) < len(t_list):
        print("Yes")
    else:
        print("No")

    return

if __name__ == "__main__":
    main()

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import random
s=list(input())
t=list(input())
random.shuffle(s)
random.shuffle(t)
S=''.join(s)
T=''.join(t)
L=[S,T]
L.sort()
if T==S:
  print('No')
elif L[0]==S:
  print('Yes')
elif L[0]==T:
  print('No')


Failing test case input:
{yy
x||

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=list(input())
t=list(input())
S=''.join(sorted(s))
T=''.join(sorted(t)[::-1])
L=sorted([S,T])

if S==T:
  print('No')
else:
  if L[0]==S:
    print('Yes')
  else:
    print('No')
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())
s.sort()
t.reverse()

if s < t:
    print("Yes")
else:
    print("No")

Failing test case input:
yyy
{{x

Expected output:
Yes


Actual output:
No


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

s.sort()
t.sort(reverse=True)

if s < t:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    try:
        s = sorted(input())
        t = sorted(input())
        print('Yes') if s > t else print('No')
    except:
        pass

if __name__ == "__main__":
    main()

Failing test case input:
y
vw

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    try:
        s = sorted(input())
        t = sorted(input(),reverse=True)
        
        
        print('Yes') if s < t else print('No')
    except:
        pass

if __name__ == "__main__":
    main()

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
N = len(S)
T = list(input())
M = len(T)
S.sort()
T.sort()
mmm = min(N, M)

for i in range(mmm):
    if S[i] > T[i]:
        print("No")
        exit()
    elif S[i] < T[i]:
        print("Yes")
        exit()
    else:
        continue

if N < M:
    print("Yes")
else:
    print("No")


Failing test case input:
w
uw

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = list(input())
N = len(S)
T = list(input())
M = len(T)
S.sort()
T.sort(reverse = True)
mmm = min(N, M)

for i in range(mmm):
    if S[i] > T[i]:
        print("No")
        exit()
    elif S[i] < T[i]:
        print("Yes")
        exit()
    else:
        continue

if N < M:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

def main():
    s = input()
    t = input()

    s_list = sorted(s)
    t_list = sorted(t, reverse=True)
    S = ''.join(s_list)
    T = ''.join(t_list)
    print(S < T)


if __name__ == '__main__':
    main()


Failing test case input:
cd
bac

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

def main():
    s = input()
    t = input()

    s_list = sorted(s)
    t_list = sorted(t, reverse=True)
    S = ''.join(s_list)
    T = ''.join(t_list)
    if S < T:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

s = input()
t = input()

tmp = list(s)
tmp.sort()
s_ = "".join(tmp)

tmp = list(t)
tmp.sort(reverse=True)
t_ = "".join(tmp)

for s_i_, t_i_ in zip(s_, t_):
    if ord(s_i_) < ord(t_i_):
        print("Yes")
        sys.exit()
print("No")

Failing test case input:
v
vq

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
from itertools import zip_longest

s = input()
t = input()

tmp = list(s)
tmp.sort()
s_ = "".join(tmp)

tmp = list(t)
tmp.sort(reverse=True)
t_ = "".join(tmp)

st_ = [s_, t_]
st_.sort()

if s_ == t_:
    print("No")
elif st_[0] == s_:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())
i = 0

s.sort()
t.sort(reverse=True)

length = min(len(s), len(t))

while i <= length-1:
    if s[i] == t[i]:
        i += 1
    elif s[i] < t[i]:
        print('Yes')
        exit()
    else:
        print('No')
        exit()

print('Yes' if length == len(s) else 'No')


Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())
i = 0

s.sort()
t.sort(reverse=True)

length = min(len(s), len(t))

while i <= length-1:
    if s[i] == t[i]:
        i += 1
    elif s[i] < t[i]:
        print('Yes')
        exit()
    else:
        print('No')
        exit()

print('No' if length == len(t) else 'Yes')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input().rstrip())
t=list(input().rstrip())

s.sort()
t.sort()

if str(''.join(s))>=str(''.join(t)):
    print("No")
else:
    print("Yes")


Failing test case input:
ratcode
salt`

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=list(input().rstrip())
t=list(input().rstrip())

s.sort()
t.sort(reverse=True)

if str(''.join(s))>=str(''.join(t)):
    print("No")
else:
    print("Yes")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()

c = sorted(a)
d = list(reversed(b))

if c < d and c != d:
  print("Yes")
else:
  print("No")

Failing test case input:
v
vq

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = input()
b = input()

c = ''.join(sorted(a))
d = ''.join(sorted(b, reverse=True))

if c < d:
  print("Yes")
else:
  print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = sorted( list(input()) )
t = sorted( list(input()), reverse=True )

str_list = ["".join(s), "".join(t)]

sorted_str_list = sorted(str_list)

if str_list[0] == sorted_str_list[0]:
    print("Yes")
else:
    print("No")

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s = sorted( list(input()) )
t = sorted( list(input()), reverse=True )

if s == t:
    print("No")
else:
    str_list = ["".join(s), "".join(t)]

    sorted_str_list = sorted(str_list)

    if str_list[0] == sorted_str_list[0]:
        print("Yes")
    else:
        print("No")
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = ''.join(sorted(list(input())))
T = ''.join(list(reversed(list(input()))))
if S < T:
    print('Yes')
else:
    print('No')

Failing test case input:
yx
yzb

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = ''.join(sorted(list(input())))
T = ''.join(reversed(sorted(list(input()))))

if S < T:
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s = input()
t = input()
s = ''.join(sorted(s, reverse=True))
t = ''.join(sorted(t, reverse=True))
if s>=t:
    print('No' , flush=True)
else:
    print('Yes' , flush=True)


Failing test case input:
eaobtds
salta

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
s = ''.join(sorted(s))
t = ''.join(sorted(t, reverse=True))
if s>=t:
    print('No' , flush=True)
else:
    print('Yes' , flush=True)

Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = "".join(sorted(list(input())))
t = "".join(reversed(list(input())))

if s < t:
  print("Yes")
else:
  print("No")

Failing test case input:
rdtcoae
salt`

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = "".join(sorted(input()))
t = "".join(sorted(input(), reverse=True))

if s < t: print("Yes")
else: print("No")

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

s = input()
t = input()


s = "".join(sorted(s))
t = "".join(sorted(t, reverse=True))
st_list = [s, t]


if s == t:
    print("NO")
elif st_list == sorted(st_list):
    print("YES")
else:
    print("NO")

Failing test case input:
eaoctdr
salt`

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):



s = input()
t = input()


s = "".join(sorted(s))
t = "".join(sorted(t, reverse=True))
st_list = [s, t]


if s == t:
    print("No")
elif st_list == sorted(st_list):
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
M = input()

sorted_asc = sorted(list(N))
sorted_desc = sorted(list(M), reverse=True)
res = ""

for (x, y) in zip(sorted_asc, sorted_desc):
    if x < y:
        res = "Yes"
        break
    elif x > y:
        res = "false"
        break

if res == "" and len(N) == len(M):
    res = "No"
elif res == "" and len(N) < len(M):
    res = "Yes"

print(res)

Failing test case input:
dd
acc

Expected output:
No


Actual output:
false


Fixed submission (verdict: Accepted):
N = input()
M = input()

sorted_asc = sorted(list(N))
sorted_desc = sorted(list(M), reverse=True)
res = ""

for (x, y) in zip(sorted_asc, sorted_desc):
    if x < y:
        res = "Yes"
        break
    elif x > y:
        res = "No"
        break

if res == "" and len(N) == len(M):
    res = "No"
elif res == "" and len(N) < len(M):
    res = "Yes"
elif res == "" and len(N) > len(M):
    res = "No"

print(res)
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())

s.sort(reverse=True)
t.sort(reverse=True)
if s < t:
    print("Yes")
else:
    print("No")


Failing test case input:
scuboae
atlat

Expected output:
Yes


Actual output:
No


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

s.sort()
t.sort(reverse=True)
if s < t:
    print("Yes")
else:
    print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()
s_l,t_l=[],[]
for i in s:
	s_l.append(i)
for i in t:
	t_l.append(i)
s_l.sort(reverse=True)
t_l.sort()
s="".join(s_l)
t="".join(t_l)
if s<t:
	print("Yes")
else:
	print("No")


Failing test case input:
yy
czy

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=input()
t=input()
s_l,t_l=[],[]
for i in s:
	s_l.append(i)
for i in t:
	t_l.append(i)
s_l.sort()
t_l.sort(reverse=True)
s="".join(s_l)
t="".join(t_l)
if s<t:
	print("Yes")
else:
	print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = sorted(input())
t = sorted(input())
if t > s:
  print("Yes")
else:
  print("No")


Failing test case input:
v
vq

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = sorted(input())
t = sorted(input(),reverse=True)
if t > s:
  print("Yes")
else:
  print("No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=sorted(input())[::-1]
t=sorted(input())[::-1]
print('Yes' if s<t else 'No')


Failing test case input:
ocfbuas
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=sorted(input())
t=sorted(input())[::-1]
print('Yes' if s<t else 'No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=str(input())
t=str(input())
s=sorted(s)
t=sorted(t,reverse=True)
s="".join(s)
t="".join(t)
if s>t:
  print("No")
else:
  print("Yes")

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
s=str(input())
t=str(input())
s=sorted(s)
t=sorted(t,reverse=True)
s="".join(s)
t="".join(t)
if s>=t:
  print("No")
else:
  print("Yes")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())
s.sort()
t.sort()
print("Yes" if "".join(s) < "".join(t) else "No")

Failing test case input:
v
rw

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())
s.sort()
t.sort()
t.reverse()
print("Yes" if "".join(s) < "".join(t) else "No")
Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = sorted(input())
t = sorted(input())
flag1 = True
flag2 = False
if len(s) < len(t):
    for i in range(len(s)):
        if s[i] != t[i]:
            flag1 = False
            break
else:
    flag1 = False
for i in range(min(len(s), len(t))):
    if s[i] < t[i]:
        flag2 = True
        break
if flag1 or flag2:
    print('Yes')
else:
    print('No')

Failing test case input:
v
tw

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = sorted(input())
t = sorted(input(),reverse = True)
flag1 = True
flag2 = False
if len(s) < len(t):
    for i in range(len(s)):
        if s[i] != t[i]:
            flag1 = False
            break
else:
    flag1 = False
for i in range(min(len(s), len(t))):
    if s[i] < t[i]:
        flag2 = True
        break
    elif s[i] > t[i]:
        break
if flag1 or flag2:
    print('Yes')
else:
    print('No')

Problem: p03486
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = list(input())
t = list(input())
s.sort()
t.sort(reverse=True)
for i in range(min(len(s), len(t))):
    if s[i] < t[i]:
        print("Yes")
        exit()
print("Yes" if len(s) < len(t) else "No")

Failing test case input:
dd
cab

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())
s.sort()
t.sort(reverse=True)
for i in range(min(len(s), len(t))):
    if ord(s[i]) < ord(t[i]):
        print("Yes")
        exit()
    elif ord(s[i]) > ord(t[i]):
        print("No")
        exit()
print("Yes" if len(s) < len(t) else "No")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
p = []
q = []
m = len(s)
n = len(t)
ans = 0
for i in range(m):
    p.append(s[i])
p.sort()
for j in range(n):
    q.append(t[j])
q.sort()
if m >= n:
    ans = "No"
else:
    ans = "Yes"
for k in range(min(m,n)):
    if ord(p[k]) < ord(q[k]):
        ans = "Yes"
        break
    elif ord(p[k]) > ord(q[k]):
        ans = "No"
        break
print(ans)

Failing test case input:
eaobtcs
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
p = []
q = []
m = len(s)
n = len(t)
if m >= n:
    ans = "No"
else:
    ans = "Yes"
for i in range(m):
    p.append(s[i])
p.sort()
for j in range(n):
    q.append(t[j])
q.sort(reverse=True)
for k in range(min(m,n)):
    if ord(p[k]) < ord(q[k]):
        ans = "Yes"
        break
    elif ord(p[k]) > ord(q[k]):
        ans = "No"
        break
print(ans)
Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
first = sorted(list(input('')))
second = sorted(list(input('')), reverse=True)
length = len(first) < len(second)

result = False
for (f, s) in zip(first, second):
  if f < s:
    result = True
    break

if length and result:
  print('Yes')
else:
  print('No')

Failing test case input:
scuboae
atlat

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
first = sorted(list(input('')))
second = sorted(list(input('')), reverse=True)
length = len(first) < len(second)

result = False
check_equal = False
for (f, s) in zip(first, second):
  check_equal = (s == f)
  if f < s:
    result = True
    break
  elif f > s:
    result = False
    break

if (length and check_equal) or result:
  print('Yes')
else:
  print('No')

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

s=input()
t=input()

s=sorted(s)
t=sorted(t,reverse=True)

if s> t:
    print("No")

else:
    print("Yes")

Failing test case input:
zzz
zzz

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):

s=input()
t=input()

s=sorted(s)
t=sorted(t,reverse=True)

if s> t:
    print("No")

elif s==t:
    print("No")

else:
    print("Yes")

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())
s.sort()
t.reverse()
S = str()
T = str()
for i in s:
    S += i
for k in t:
    T += k
if S<T:
    print('Yes')
else:
    print('No')

Failing test case input:
xy
xzb

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = sorted(list(str(input())))
t = reversed(sorted(list(str(input()))))
S = str()
T = str()
for i in s:
    S += i
for k in t:
    T += k
print('Yes' if S<T else 'No')

Problem: p03486
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
check = False
for i in range(len(s)):
    s = s[len(s)-1] + s[:len(s)-1]
    for j in range(len(t)):
        t = t[len(t)-1] + t[:len(t)-1]
        print(s,t,sep="\n")
        if s < t:
            check = True
            break
    if check:
       break
if check:
    print("Yes")
else:
    print("No")

Failing test case input:
cd
bac

Expected output:
No


Actual output:
dc
cba
dc
acb
dc
bac
cd
cba
cd
acb
cd
bac
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
check = False
for i in range(len(s)):
    s = s[len(s)-1] + s[:len(s)-1]
    for j in range(len(t)):
        t = t[len(t)-1] + t[:len(t)-1]
        if s < t:
            check = True
            break
    if check:
       break
if check:
    print("Yes")
else:
    print("No")