Harryxun/stf_run huggingface dataset:
N = int(input())
H = [int(x) for x in input().split()]
x = 1
ans = 1

for i in range(1,len(H)):
    if H[i] <= H[i-1]:
        x += 1
        if x > ans:
            ans = x
    else:
        x = 1
print(ans)

### FIXED CODE ###

S = input()
T = input()
c = 0
for i in range(3):
    if S[i] == T[i]:
        c += 1
print(c)
n=int(input())
k=int(input())
x=1

for i in range(n):
    x=min(x*2,x+k)

print(x)


### FIXED CODE ###

# -*- coding utf-8 -*-
n=int(input())
x=1

while (x+1)**2<=n:
    x+=1
print(x**2)
import numpy as np
n, m = map(int, input().split())
ab = np.array([list(map(int, input().split())) for x in range(m)]) - 1

to = list(range(n))
ranks = [0] * n
nodes = [1] * n

def find(x):
    if to[x] == x:
        return x
    else:
        root = find(to[x])
        to[x] = root
        return root

entire = (n - 1) * n // 2
def merge(x, y):
    global entire
    xroot = find(x)
    yroot = find(y)
    if xroot == yroot:
        return
    if ranks[xroot] < ranks[yroot]:
        to[xroot] = yroot
        entire -= nodes[yroot] * nodes[xroot]
        nodes[yroot] += nodes[xroot]
    else:
        to[yroot] = xroot
        entire -= nodes[yroot] * nodes[xroot]
        nodes[xroot] += nodes[yroot]
        if ranks[xroot] == ranks[yroot]:
            ranks[yroot] += 1


results = [entire]
for a, b in reversed(ab[1:]):
    merge(a, b)
    results.append(entire)

for v in reversed(results):
    print(v)


### FIXED CODE ###

import numpy as np
n, m = map(int, input().split())
ab = np.array([list(map(int, input().split())) for x in range(m)]) - 1

to = list(range(n))
ranks = [0] * n
nodes = [1] * n

def find(x):
    if to[x] == x:
        return x
    else:
        root = find(to[x])
        to[x] = root
        return root

entire = (n - 1) * n // 2
def merge(x, y):
    global entire
    xroot = find(x)
    yroot = find(y)
    if xroot == yroot:
        return
    if ranks[xroot] < ranks[yroot]:
        to[xroot] = yroot
        entire -= nodes[yroot] * nodes[xroot]
        nodes[yroot] += nodes[xroot]
    else:
        to[yroot] = xroot
        entire -= nodes[yroot] * nodes[xroot]
        nodes[xroot] += nodes[yroot]
        if ranks[xroot] == ranks[yroot]:
            ranks[xroot] += 1


results = [entire]
for a, b in reversed(ab[1:]):
    merge(a, b)
    results.append(entire)

for v in reversed(results):
    print(v)
n = int(input())
x = input()
fl = {}


def popcount(n):
    s = str(format(n, "b"))
    return s.count("1")


def f(n):
    cnt = 0
    while n > 0:
        n = n % popcount(n)
        if str(n) in fl:
            cnt += fl[n]
            break
        cnt += 1

    fl[n] = cnt
    return cnt


def getX(m, i):
    s = (ord(x[i]) % 2 + 1) % 2
    s = x[:i] + str(s) + x[i + 1:]
    return int(s, 2)


for i in range(n):
    rx = getX(x, i)
    print(f(rx))


### FIXED CODE ###

l, r, d = map(int, input().split())
print(r // d - (l-1) // d)
# -*- coding: utf-8 -*-
n,m = map(int, input().split())
i=0
lst = []
while i < m: 
    lst.append(list(map(int, input().split())) + [i])
    i+=1
lst.sort()
j=1

i=1
for k in lst:
    if i != k[0]:
        i==k[0]
        j=1
        k[1]=i*1000000+j
    else:
        j+=1
        k[1]=i*1000000+j


#ans
for ans in sorted(ll, key=lambda x:x[2]):
    print('{0:012d}'.format(ans[1]))

### FIXED CODE ###

# -*- coding: utf-8 -*-
n,m = map(int, input().split())
i=0
lst = []
while i < m: 
    lst.append(list(map(int, input().split())) + [i])
    i+=1
lst = sorted(lst)
j=0
i=1
for k in lst:
    if i != k[0]:
        i=k[0]
        j=1
        k[1]=i*1000000+j
    else:
        j+=1
        k[1]=i*1000000+j

#ans
for ans in sorted(lst, key=lambda x:x[2]):
    print('{0:012d}'.format(ans[1]))
A, B, C, X = map(int,input().split())
count = 0

for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500*i+100*j+50*k == X:
                count += 1
print(count)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0

for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500*i+100*j+50*k == X:
                count += 1
print(count)
a=list(int(input))
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 4:
    print('Good')
  else:
    continue
  
  

### FIXED CODE ###

a=list(input())
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 3:
    print('Good')
  i += 1
W,H,x,y=map(int,input().split())
S=W*H/2
z=0
if x== W/2 & y== H/2:
    z=1
else:
    z=0
print(S,z)         


### FIXED CODE ###

W,H,x,y=map(int,input().split())
S=W*H/float(2)
z=0
if x== W/2:
    if y== H/2:
        z=1
    else:
        z=0
else:
    z=0
print(S,z)
A,B,Q=map(int,input().split())
s=[int(input()) for _ in range(A)]
t=[int(input()) for _ in range(B)]

#二分探索関数
def bin_search(x,seq):
    a=0
    b=len(seq)-1
    for len(seq):
        center=((a+b)//2)
        if x>=seq[center]:
            a=center
        else:
            b=center
        if b-a<=1:
            break
    return seq[a],seq[b]

for i in range(Q):
    x=int(input())
    Nb_s0,Nb_s1=bin_search(x,s)
    Nb_t0,Nb_t1=bin_search(x,t)
    k1=abs(Nb_s0-x)+abs(Nb_t0-Nb_s0)
    k2=abs(Nb_s1-x)+abs(Nb_t0-Nb_s1)
    k3=abs(Nb_s0-x)+abs(Nb_t1-Nb_s0)
    k4=abs(Nb_s1-x)+abs(Nb_t1-Nb_s1)
    k5=abs(Nb_t0-x)+abs(Nb_t0-Nb_s0)
    k6=abs(Nb_t1-x)+abs(Nb_t1-Nb_s1)
    k7=abs(Nb_t0-x)+abs(Nb_t0-Nb_s1)
    k8=abs(Nb_t1-x)+abs(Nb_t1-Nb_s0)
    print(min(k1,k2,k3,k4,k5,k6,k7,k8))

### FIXED CODE ###

inf=10**11
A,B,Q=map(int,input().split())
s=[-inf]+[int(input()) for _ in range(A)]+[inf]
t=[-inf]+[int(input()) for _ in range(B)]+[inf]
x=[[i,int(input())] for i in range(Q)]

x.sort(key=lambda x:x[1])
i,s_i,t_i=0,0,0
ans=[]

for i in range(Q):
    while(1):
        if x[i][1]>=s[s_i]:
            s_i+=1
        else:
            break
    while(1):
        if x[i][1]>=t[t_i]:
            t_i+=1
        else:
            break
    ans.append([x[i][0],x[i][1],s[s_i-1],s[s_i],t[t_i-1],t[t_i]])
ans.sort(key=lambda x:x[0])
for i in range(Q):
    xx=ans[i][1]
    Nb_s0=ans[i][2]
    Nb_s1=ans[i][3]
    Nb_t0=ans[i][4]
    Nb_t1=ans[i][5]

    p1=abs(Nb_s0-xx)
    p2=abs(Nb_s1-xx)
    p3=abs(Nb_t0-xx)
    p4=abs(Nb_t1-xx)
    q1=abs(Nb_t0-Nb_s0)
    q2=abs(Nb_t0-Nb_s1)
    q3=abs(Nb_t1-Nb_s0)
    q4=abs(Nb_t1-Nb_s1)
    print(min(p1+q1,p2+q2,p1+q3,p2+q4,p3+q1,p4+q4,p3+q2,p4+q3))
a,b,c,d=map(int,raw_input().split())
leastnum=0
if a>b and c>d:
  leastnum=b+d
elif a>b and d>c:
  leastnum=b+c
elif b>a and c>d:
  leastnum=a+d
elif b>a and d>c:
  leastnum=a+c
print leastnum

### FIXED CODE ###

a=input()
b=input()
c=input()
d=input()
leastnum=0
if a>=b and c>=d:
  leastnum=b+d
elif a>=b and d>=c:
  leastnum=b+c
elif b>=a and c>=d:
  leastnum=a+d
elif b>=a and d>=c:
  leastnum=a+c
print leastnum
import math
N,K = map(int,input().split())
A = list(map(int,input().split()))
for j in range(min(K,2*(math.log2(N)+1))):
	B = [0]*N
	for i in range(N):
		l = max(0,i-A[i])
		r = min(N-1,i+A[i])
		B[l] += 1
		if r < N-1:
			B[r+1] -= 1
	for i in range(1,N):
		B[i] += B[i-1]
	A = B
print(' '.join(map(str,A)))


### FIXED CODE ###

import math
N,K = map(int,input().split())
A = list(map(int,input().split()))
for j in range(min(K,50)):
	B = [0]*N
	for i in range(N):
		l = max(0,i-A[i])
		r = min(N-1,i+A[i])
		B[l] += 1
		if r < N-1:
			B[r+1] -= 1
	for i in range(1,N):
		B[i] += B[i-1]
	A = B
print(' '.join(map(str,A)))
class UnionFind():
  def __init__(self, n):
    self.n = n
    self.root = [-1]*n
    self.rank = [0]*n
    
  def find_root(self, e):
    if self.root[e] < 0:
      return e
    else:
      r = self.find_root(self.root[e])
      self.root[e] = r
      return r
    
  def combine(self, e1, e2):
    root1 = self.find_root(e1)
    root2 = self.find_root(e2)
    if root1 == root2:
      pass
    elif self.rank[root1] < self.rank[root2]:
      self.root[root1] += self.root[root2]
      self.root[root2] = root1
      self.rank[root1] = self.rank[root2] + 1
    elif self.rank[root2] < self.rank[root1]:
      self.root[root2] += self.root[root1]
      self.root[root1] = root2
      self.rank[root2] = self.rank[root1] + 1
    else:
      self.root[root2] += self.root[root1]
      self.root[root1] = root2
      self.rank[root2] += 1
      
  def in_the_same_group(self, e1, e2):
      r1 = self.find_root(e1)
      r2 = self.find_root(e2)
      if r1 == r2:
        return True
      return False
  

NMK = input().split()
N = int(NMK[0])
M = int(NMK[1])
K = int(NMK[2])
uf = UnionFind(N)
from collections import defaultdict

friend_list = [0]*N
for _ in range(M):
  AB = input().split()
  A = int(AB[0])-1
  B = int(AB[1])-1
  uf.combine(A,B)
  friend_list[A] += 1
  friend_list[B] += 1

block_list = [0]*N
for _ in range(K):
  CD = input().split()
  C = int(CD[0])-1
  D = int(CD[1])-1
  if uf.in_the_same_group(C, D):
    block_list[C] += 1
    block_list[D] += 1

ans = []
if M == 0:
  ans = ["0"] * N
else:
  for i in range(N):
    cnt = -uf.root[uf.find_root(i)] - 1 - friend_list[i] - block_list[i]
    ans.append(str(cnt))
print(" ".join(ans))

### FIXED CODE ###

class UnionFind():
 def __init__(self,n):
   self.n=n
   self.root=[-1]*(n+1)
   self.rank=[0]*(n+1)
 def FindRoot(self,x):
   if self.root[x]<0:
     return x
   else:
     self.root[x]=self.FindRoot(self.root[x])
     return self.root[x]
 def Unite(self,x,y):
   x=self.FindRoot(x)
   y=self.FindRoot(y)
   if x==y:
     return
   else:
     if self.rank[x]>self.rank[y]:
       self.root[x]+=self.root[y]
       self.root[y]=x
     elif self.rank[x]<=self.rank[y]:
       self.root[y]+=self.root[x]
       self.root[x]=y
       if self.rank[x]==self.rank[y]:
         self.rank[y]+=1
 def isSameGroup(self,x,y):
   return self.FindRoot(x)==self.FindRoot(y)
 def Count(self,x):
   return -self.root[self.FindRoot(x)]
 
n,m,k=map(int,input().split())
t=UnionFind(n+1)
cnt=[0]*(n+1) #各iについて、iと同一の連結成分に属する友達関係の人、ブロック関係の人の数を数える
for _ in range(m):
 a,b=map(int,input().split())
 cnt[a]+=1 #各iについて、iと同一の連結成分に属する友達関係の人の数を数える
 cnt[b]+=1
 t.Unite(a,b)
for _ in range(k):
 a,b=map(int,input().split())
 if t.isSameGroup(a,b)==True:
   cnt[a]+=1 #各iについて、iと同一の連結成分に属するブロック関係の人の数を数える
   cnt[b]+=1
ans=[0]*(n+1)
for i in range(1,n+1):
 ans[i]=(t.Count(i)-1)-cnt[i] #答えは(各iが属する連結成分のサイズ)-1-((iと同一の連結成分に含まれているiと友達関係にある人の数)+(iと同一の連結成分に含まれているiとブロック関係にある人の数)となる
print(*ans[1:])
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def ris(): return list(input())
def pli(a): return "".join(list(map(str, a)))

import math

n, k = rli()
a = rli()
if(max(a) < k):
    print("IMPOSSIBLE")
else:
    g = a[0]
    for i in a[1:]:
        g = math.gcd(g, i)
    if(k % g == 0):
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")


### FIXED CODE ###

import fractions

def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def ris(): return list(input())
def pli(a): return "".join(list(map(str, a)))


n, k = rli()
a = rli()
if(max(a) < k):
    print("IMPOSSIBLE")
else:
    g = a[0]
    for i in a[1:]:
        g = fractions.gcd(g, i)
    if(k % g == 0):
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
N, Q = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(N)]
a.sort(key=lambda x: x[2])
for i in range(N):
    a[i] = [a[i][0] - a[i][2], a[i][1] - a[i][2], a[i][2]]
d = [int(input()) for _ in range(Q)]
idx = 0
for p in d:
    flg = 1
    while not (a[idx][0] <= p < a[idx][1]):
        if idx + 1 >= N or a[idx][1] <= p < a[idx + 1][0]:
            flg = 0
            break
        idx += 1
    print(a[idx][2] if flg else -1)

### FIXED CODE ###

A, P = map(int, input().split())
P += A * 3
print(P // 2)
N = int(input())

def ask1(n):
  s = ['?'] + [i for i in range(n,n+N)]
  print(*s)
  return input()

def ask2(a,l,r):
  if l == r:
    s = ['?'] + [a] 
  else:
    s = ['?'] + [a] + [i for i in range(l,r+1)]
  print(*s)
  return input()

def ask3(a,l,r):
  if l == r:
    s = ['?'] + [a] 
  elif l < 1:
    s = ['?'] + [a] + [i for i in range(N+2,N*2+1)]
  elif r > N*2:
    s = ['?'] + [a] + [i for i in range(1,N)]
  else:
    s = ['?'] + [a] + [i for i in range(1,l+1)] + [i for i in range(r,N*2+1)]
  print(*s)
  return input()

#print(ask1(10))
#print(ask2(1,4,7))
#print(ask3(7,4,11))
#exit()

ans = ['' for _ in range(N*2)]

a = ask1(1)
if a == 'Red':
  LC = 'Red'
else:
  LC = 'Blue'

l = 1
r = N+1
while(l+1 == r):
  m = (l+r)//2
  a = ask1(m)
  if a == LC:
    l = m
  else:
    r = m

sl = r
sr = l+N-1
for i in range(1,N*2+1):
  if sl <= i <= sr:
    a = ask3(i,sl-2,sr+2)
  else:
    a = ask2(i,sl,sr)
  if a == 'Red':
    ans[i-1] = 'R'
  else:
    ans[i-1] = 'B'
  
print('! '+''.join(ans))

### FIXED CODE ###

N = int(input())

def ask1(n):
  s = ['?'] + [i for i in range(n,n+N)]
  print(*s)
  return input()

def ask2(a,l,r):
  if l == r:
    s = ['?'] + [a] 
  else:
    s = ['?'] + [a] + [i for i in range(l,r+1)]
  print(*s)
  return input()

def ask3(a,l,r):
  if l == r:
    s = ['?'] + [a] 
  elif l < 1:
    s = ['?'] + [a] + [i for i in range(N+2,N*2+1)]
  elif r > N*2:
    s = ['?'] + [a] + [i for i in range(1,N)]
  else:
    s = ['?'] + [a] + [i for i in range(1,l+1)] + [i for i in range(r,N*2+1)]
  print(*s)
  return input()

#print(ask1(10))
#print(ask2(1,4,7))
#print(ask3(7,4,11))
#exit()

ans = ['' for _ in range(N*2)]

a = ask1(1)
if a == 'Red':
  LC = 'Red'
else:
  LC = 'Blue'

l = 1
r = N+1
while(l+1 < r):
  m = (l+r)//2
  a = ask1(m)
  if a == LC:
    l = m
  else:
    r = m

sl = r
sr = l+N-1
for i in range(1,N*2+1):
  if sl <= i <= sr:
    a = ask3(i,sl-2,sr+2)
  else:
    a = ask2(i,sl,sr)
  if a == 'Red':
    ans[i-1] = 'R'
  else:
    ans[i-1] = 'B'
  
print('! '+''.join(ans))
import math
r = int(input())
s=r**2*math.pi
l=2*r*math.pi
print(float(s),float(l))

### FIXED CODE ###

import math
r = float(input())
s=r**2*math.pi
l=2*r*math.pi
print('{:.6f} {:.6f}'.format(s,l))
from functools import reduce
from operator import mul

n = int(input())
print(reduce(mul, map(range(1,n+1))))

### FIXED CODE ###

n = int(input())
print(sum(range(1,n+1)))
N = input().split()

a = int(N[0])
b = int(N[1])
c = int(N[2])

count = 0
for i in range[a, b]:
    d = c % i
    if d == 0:
       count += 1
print(count)

### FIXED CODE ###

N = input().split()

a = int(N[0])
b = int(N[1])
c = int(N[2])

count = 0
while a <= b:
    if c % a == 0:
       count += 1
    a += 1
print(count)
a = int(input())
s = input()

if a >= 3200:
  print(S)
else:
  print("red")

### FIXED CODE ###

a = int(input())
s = input()

if a >= 3200:
  print(s)
else:
  print("red")
N = int(input())
L = []
Dic = {}
for n in range(N):
    S = input()
    L.append(S)
Unique = list(set(L))

for i in Unique:
    Dic[i]=0

for j in range(len(L)):
    Dic[j] = Dic[j] + 1
    
max_k_list = [kv[0] for kv in Dic.items() if kv[1] == max(Dic.values())]
max_k_list = sorted(max_k_list)
for t in max_k_list:
    print(t)

### FIXED CODE ###

from collections import Counter
N = int(input())
L = [input() for _ in range(N)]
#for n in range(N):
    #S = input()
    #L.append(S)
Dic = Counter(L)
max_value = max(Dic.values())
max_k_list = [i for i, j in Dic.items() if j == max_value]
max_k_list = sorted(max_k_list)
for t in max_k_list:
    print(t)
# -*- coding:utf-8 -*-
n=int(raw_input())
for i in range(n):
    a,b,c,d,e,f,g,h=map(float,raw_input().split(" "))
    t=(d-b)/(c-a)
    y=(h-f)/(g-e)
    if y==t or y==-t:
        print "YES"
    else:
        print "NO",

### FIXED CODE ###

n = int(raw_input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
    print "YES" if abs(((y2-y1)*(x4-x3) - (x2-x1)*(y4-y3))) < 1e-10 else "NO"
for j in range(n-1) :
    if vlist[j][0] <= vlist[j+1][0] and vlist[j][1] <= vlist[j][1] :
        continue
    if vlist[j][0] > vlist[j+1][0] and vlist[j][0] > vlist[j][1] :
        vlist[j+1] = [int(k*(np.lcm(vlist[j][0], vlist[j+1][0]))/vlist[j+1][0]) for k in vlist[j+1]]
        continue
    elif vlist[j][1] > vlist[j+1][1] and vlist[j][1] > vlist[j][0]:
        vlist[j+1] = [int(k*(np.lcm(vlist[j][1], vlist[j+1][1]))/vlist[j+1][1]) for k in vlist[j+1]]
        continue
    elif vlist[j+1][0] > vlist[j+1][1] :
        vlist[j+1] = [int(k*(np.lcm(vlist[j][1], vlist[j+1][1]))/vlist[j+1][1]) for k in vlist[j+1]]
        continue
    else :
        vlist[j+1] = [int(k*(np.lcm(vlist[j][0], vlist[j+1][0]))/vlist[j+1][0]) for k in vlist[j+1]]
print(sum(vlist[n-1]))

### FIXED CODE ###

n = int(input())
votelist = [list(map(int, input().split())) for _ in range(n)]

chlist = votelist[0]
for i in range(1, n):
    x = max(-(chlist[0]*-1 // votelist[i][0]), -(chlist[1]*-1 // votelist[i][1]))
    chlist[0] = votelist[i][0] * x
    chlist[1] = votelist[i][1] * x
    
print(sum(chlist))
a = input()
print(a + a ** 2 + a ** 3)

### FIXED CODE ###

a=int(input())
print(a+a**2+a**3)
for i in range(3):
    a[i]=input()
b=[]
b.append(a[0][0])
b.append(a[1][1])
b.append(a[2][2])
ans=''.join(b)
print(ans)

### FIXED CODE ###

a=['']*3
for i in range(3):
    a[i]=input()
b=[]
b.append(a[0][0])
b.append(a[1][1])
b.append(a[2][2])
ans=''.join(b)
print(ans)
A, B = map(int, input().split())
list = [300000,200000,100000,0]
if(A>3 or A<0):
    A = 4
elif(B>3 or B<0):
    B = 4
money = list[A-1]+list[B-1]
if(A==1 and B==1):
    money = 1000000
print(money)


### FIXED CODE ###

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

list = [500000,300000,200000,100000,0]

if(A>3):
    A = 4
if(B>3):
    B = 4
elif(A==1 and B==1):
    A=B=0
money = list[A]+list[B]
print(money)
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))score = 0
order = -1
for i in range(n):
  score += b[i]
  _order = a[i]
  
  if order+1 == _order:
    score += c[order - 1]
  order = _order
  
print(score)

### FIXED CODE ###

n = int(input())
answer = n * n * n
print(answer)
from decimal import *

getcontext().prec = 10000
a, b, c = map(int, input().split())

l = Decimal(a).sqrt() + Decimal(b).sqrt()
r = Decimal(c).sqrt()

if l < r:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

K = int(input())

s = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51".split(", ")

print(s[K-1])
N = int(input())
H = list(map(int, input().split()))

best = 0
for i, j in range(N-1):
  a=0
  if H[i] >= H[j]:
      a += 1
  else : break
  if a > best :
    best = a
print(best)

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))

best = []
a = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    a += 1
  else : 
    best.append(a)
    a = 0
best.append(a)
print(max(best))
s = input()
t = input()
s1 = [str(a) for a in s]
t1 = [str(a) for a in t]
s1.sort()
t1.sort()
import copy
t2 = copy.copy(t1)
for i in range(len(t1)):
  t1[i] = t2[len(t1)-i-1]

n = 0
l = 0
i = 0
while n==0 and i <= min(len(t),len(s)):
  if s1[i] == t1[i]:
    l = l + 1
    i = i + 1
  elif s1[i] < t1[i]:
    n = n + 1
    print('Yes')
  elif s1[i] > t1[i]:
    n = n + 1
    print('No')
if l == len(t) and len(t) <= len(s):
  print('No')
elif l == len(s) and len(s) < len(t):
  print('Yes')

### FIXED CODE ###

s = input()
t = input()
s1 = [str(a) for a in s]
t1 = [str(a) for a in t]
s1.sort()
t1.sort()
import copy
t2 = copy.copy(t1)
for i in range(len(t1)):
  t1[i] = t2[len(t1)-i-1]

n = 0
l = 0
i = 0
while n==0 and i <= min(len(t),len(s))-1:
  if s1[i] == t1[i]:
    l = l + 1
    i = i + 1
  elif s1[i] < t1[i]:
    n = n + 1
    print('Yes')
  elif s1[i] > t1[i]:
    n = n + 1
    print('No')
if l == len(t) and len(t) <= len(s):
  print('No')
elif l == len(s) and len(s) < len(t):
  print('Yes')
H, W = map(int, input().split())
C_list = []
for _ in range(W):
    C_list.append(input())
    
for i in C_list:
    print(i + "\n" + i)

### FIXED CODE ###

H, W = map(int, input().split())
c=[input() for _ in range(H)]
for _ in c:
    print(_ + "\n" + _)
S=int(input())
h=int(S/3600)
S2=S-h
m=int(S2/60)
s=S2-m
print(h+':'+m+':'+s)

### FIXED CODE ###

S=int(input())
h=int(S/3600)
m=int(S/60)%60
s=S%60
print('{}:{}:{}'.format(h,m,s))
import fractions
from functools import reduce

P = 10**9 + 7
N = 1000000
inv_t = [0]+[1]
for i in range(2,N):
    inv_t += [inv_t[P % i] * (P - int(P / i)) % P]

_,p = [list(map(int, s.split())) for s in open(0)]
gcd_ = reduce(fractions.gcd, p)
lcm_ = 1
for q in p:
    lcm_ *= inv_t[q]
x = 1e9 + 7
ans = 0
for q in p:
    ans += int((lcm_/q)%x)
print(int(ans%x))

### FIXED CODE ###

from fractions import gcd
from functools import reduce

#互いに素なa,bについて、a*x+b*y=1の一つの解
def extgcd(a,b):
    r = [1,0,a]
    w = [0,1,b]
    while w[2]!=1:
        q = r[2]//w[2]
        r2 = w
        w2 = [r[0]-q*w[0],r[1]-q*w[1],r[2]-q*w[2]]
        r = r2
        w = w2
    #[x,y]
    return [w[0],w[1]]

# aの逆元(mod m)を求める。(aとmは互いに素であることが前提)
def mod_inv(a,m):
    x = extgcd(a,m)[0]
    return (m+x%m)%m

def lcm_mod(a, mod=-1):
    x = a[0]
    if mod == -1:
        for i in range(1, len(a)):
            x = (x * a[i]) // gcd(x, a[i])
    else:
        for i in range(1, len(a)):
            x *= (a[i] * mod_inv(gcd(x, a[i]), P)) % P
    return x

_,a = [list(map(int, s.split())) for s in open(0)]

P = 10**9 + 7
N = max(a)

lcm_ = lcm_mod(a, P)

ans = 0
for x in a:
    ans += int((lcm_*mod_inv(x,P))%P)
print(int(ans%P))
N = input()
A = list(map(int, input().split()))
odd, four = 0, 0
for i in range(N):
  if A[i] % 4 == 0:
    four += 1
  else:
    if A[i] % 2 == 1:
      odd += 1
if four < odd and four + odd < N:
  print('No')
else:
  print('Yes')


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
odd, four = 0, 0
for i in range(N):
  if A[i] % 4 == 0:
    four += 1
  else:
    if A[i] % 2 == 1:
      odd += 1
if four < odd and four + odd < N:
  print('No')
elif odd - four > 1 and four + odd == N:
  print('No')
else:
  print('Yes')
import sys
while True:
    print "PENIS!!!"*sys.maxint

### FIXED CODE ###

import math

inp = raw_input().strip().split()

a = int(inp[0])
b = int(inp[1])
c = int(inp[2])
n = 0

for i in range(a,b+1):
    if c%i == 0:
        n += 1

print n
N = int(input())
a = []
hist = []
for i in range(N):
    a.appnd(int(input()))
pos = 0
count = 0
while True:
    if pos+1 in hist:
        print(-1)
        break
    hist.append(a[pos])
    pos = a[pos]-1
    count += 1
    if pos = 1:
        print(count)
        break

### FIXED CODE ###

N = int(input())
a = [int(input()) for i in range(N)]
ans = 0
turn = 1
while True:
    if a[turn-1] == 2:
        ans += 1
        break
    if a[turn-1] == 0:
        ans = -1
        break
    next_turn = a[turn-1]
    a[turn-1] = 0
    ans += 1
    turn = next_turn

print(ans)
n = int(input())
flag = 0

for i in range(1,10):
    for j in range(1,10):
        if i*j == n:
            flag = 1

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

### FIXED CODE ###

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

if (a<=9) and (b<=9):
    print(a*b)
else:
    print(-1)
def gcd (a,b):
    if b == 0:
        return a
        
    return gcd(b, a % b)

inp = input().split()
inp = [int(x) for x in inp]

p = input().split()
p = [int(x) for x in p]

ans = gcd(abs(inp[1]-p[0]), abs(inp[1]-p[1]))
for i in range(len(p)):
    ans = gcd(ans, abs(inp[1]-p[i]))

print(ans)

### FIXED CODE ###

def gcd (a,b):
    if b == 0:
        return a
        
    return gcd(b, a % b)

inp = input().split()
inp = [int(x) for x in inp]

p = input().split()
p = [int(x) for x in p]

ans = gcd(abs(inp[1]-p[0]), abs(inp[1]-p[0]))
for i in range(len(p)):
    ans = gcd(ans, abs(inp[1]-p[i]))

print(ans)
n = int(input())
print("Yes" if n[0]== n[2] else 'No' )

### FIXED CODE ###

n=input()
print("Yes" if n[0]==n[2] else "No")