Harryxun/stf_run huggingface dataset:
N = int(input())
P = list(map(str,input().split()))
Q = list(map(str,input().split()))

import itertools
 
n_list = [i+1 for i in range(N)]
all_list = list(itertools.permutations(A))
a = all_list.index(P)
b = all_list.index(Q)
print(abs(a - b))


### FIXED CODE ###

N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

import itertools

A = [i+1 for i in range(N)]
all_permutation_list = list(itertools.permutations(A))
a = all_permutation_list.index(P)
b = all_permutation_list.index(Q)
print(abs(a - b))
N = int(input())
S = input()
K = int(input())
ans = ''
for i in S:
  if i = S[K-1]:
    ans += S[i]
  else:
    ans += '*'
print(ans)

### FIXED CODE ###

N = int(input())
S = input()
K = int(input())
ans = ''
for i in S:
  if i == S[K-1]:
    ans += i
  else:
    ans += '*'
print(ans)
N, A, B = map(int, input().split())

X = ''
Y = 1

while len(X) < N:
    if Y%2 == 1:
        X = X + 'b' * A
    elif Y%2 == 0:
        X = X + 'r' * B
    Y += 1

print(X[0:N].count('b'))

### FIXED CODE ###

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

X = N//(A+B)
Y = N%(A+B)

if A == 0:
    print(0)
else:
    if Y <= A:
        print(A * X + Y)
    else:
        print(A * X + A)
n, h, *t=map(int,open(0).read().split())
b_high = [i for i in sorted(t[1::2]) if all(i >= j for j in sorted(t[::2]))]
if (h - sum(b_high)) % a[-1] == 0:
  print(len(b_high) + (h - sum(b_high)) // sorted(t[::2])[-1])
else:
  print(len(b_high) + ((h - sum(b_high)) // sorted(t[::2])[-1]) + 1)


### FIXED CODE ###

n, h, *t=map(int,open(0).read().split())
a = t[::2]
b = t[1::2]
ma = max(a)
b_high = [i for i in b if i > ma]
if sum(b_high) > h:
  ans = 0
  b_high = sorted(b_high)
  while h > 0:
    h = h - b_high.pop()
    ans += 1
  print(ans)
else:
  if (h - sum(b_high)) % ma == 0:
    print(len(b_high) + (h - sum(b_high)) // ma)
  else:
    print(len(b_high) + ((h - sum(b_high)) // ma) + 1)
import math
A,B,H,M=map(int,input().split())
s=abs(30*H-6*M)
if s>=180:
  s=360-s
  a=math.radians(s)
ans=(A**2+B**2-2*A*B*math.cos(a))**(1/2)
print(ans)

### FIXED CODE ###

import math
A,B,H,M=map(int,input().split())
s=abs(0.5*(H*60+M)-6*M)

a=math.radians(s)
h=A**2+B**2
minus=2*A*B*math.cos(a)
ans=(h-minus)**(1/2)
print(ans)
a, b = input().split()

cards = {"2": 1, "3": 2, "4": 3, "5": 4, "6": 5, "7": 6, "8": 7, "9 ": 8, "10": 9, "11": 10, "12": 11, "13": 12, "1": 13 }

if cards[a] > cards[b]:
    print("Alice")
elif cards[a] < cards[b]:
    print("Bob")
else:
    print("Draw")


### FIXED CODE ###

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


if a == b:
    print("Draw")
elif a == 1:
    print("Alice")
elif b == 1:
    print("Bob")
elif a > b:
    print("Alice")
elif a < b:
    print("Bob")
N = int(input())
total = 0
for i in range(1,N+1)
    if (i%3) != 0 and (i%5) ! =0:
        total += i
print(total)

### FIXED CODE ###

N = int(input())
total = 0
for i in range(1, N+1):
    if (i % 3) != 0 and (i % 5) != 0:
        total = total+i
print(total)
a = raw_input()

people = 0
for i in range(int(a)):
  number_list = raw_input().split()
  people += int(number_list[1])-int(number_list[0]) +1
  
print(str(people))

### FIXED CODE ###

# -*- coding: utf-8 -*-
# get a integer
a = int(raw_input())

print("ABC"+str(a))
#!/usr/bin/env python3

dp0 = [False for i in range(16000)]
dp1 = [False for i in range(16000)]


def reachable(start, target, lst, S):

    global dp0, dp1

    for i in range(S):
        dp1[i] = False
    dp1[target] = True

    for moves in lst[::-1]:
        for i in range(S):
            dp0[i] = False
        for i in range(S):
            if dp1[i]:
                dp0[i + moves] = True
                dp0[i - moves] = True
        dp0, dp1 = dp1, dp0

    return dp1[start]

def main():
    s = input()
    sa = input().split(' ')
    x = int(sa[0])
    y = int(sa[1])

    x_list = []
    y_list = []
    moves = 0
    move_x = True
    lst = x_list
    for cmd in s:
        if cmd == 'F':
            moves += 1
        else:
            if moves != 0:
                lst.append(moves)
            moves = 0
            move_x = not move_x
            lst = x_list if move_x else y_list
    if moves != 0:
        lst.append(moves)

    if 0 < len(x_list):
        x -= x_list[0]
        x_list = x_list[1:]

    len_s = len(s)
    if reachable(len_s, len_s + x, x_list, len_s * 2) and reachable(len_s, len_s + y, y_list, len_s * 2):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3


def reachable(start, target, lst):

    current = set()
    current.add(start)

    for moves in lst:
        candidates = set()
        for x in current:
            candidates.add(x + moves)
            candidates.add(x - moves)
        current = candidates

    return target in current


def main():
    s = input()
    sa = input().split(' ')
    x = int(sa[0])
    y = int(sa[1])

    x_list = []
    y_list = []
    moves = 0
    move_x = True
    lst = x_list
    for cmd in s:
        if cmd == 'F':
            moves += 1
        else:
            # cmd == 'T'
            if moves != 0:
                lst.append(moves)
            moves = 0
            move_x = not move_x
            lst = x_list if move_x else y_list
    if moves != 0:
        lst.append(moves)

    if s[0] == 'F':
        x -= x_list[0]
        x_list = x_list[1:]

    if reachable(0, x, x_list) and reachable(0, y, y_list):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
MOD=10**9+7
def cmb(n,r):
    if n-r < r: r = n-r
    if r == 0: return 1
    denominator = 1                       
    numerator = 1                         
    for i in range(r):
        numerator *= n-i
        numerator %= Q
        denominator *= i+1
        denominator %= Q
    return numerator*pow(denominator, Q-2, Q)%Q


def main():
	S=int(input())
	ans=0
	for i in range(1,S//3+1):
		t=S-i*3
		ans+=cmb(t+i-1,i-1)
		ans%=MOD
	print(ans)

if __name__=="__main__":
	main()

### FIXED CODE ###

#import sys
#input = sys.stdin.readline
Q = 10**9+7
def cmb(n,r):
    if n-r < r: r = n-r
    if r == 0: return 1
    denominator = 1                       #分母
    numerator = 1                         #分子
    for i in range(r):
        numerator *= n-i
        numerator %= Q
        denominator *= i+1
        denominator %= Q
    return numerator*pow(denominator, Q-2, Q)%Q
 
def main():
    S = int( input())
    ans = 0
    for i in range(1, S//3+1):
        t = S - i*3
        ans += cmb(t+i-1,i-1)
        ans %= Q
    print(ans)
        
if __name__ == '__main__':
    main()
from collections import Counter
n = int(input())
a = list(map(int,input().split()))

ac = Counter(a)
ad = list(ac.values())
ad.sort()
for i in range(n):
  print(ad[i])


### FIXED CODE ###

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

lis = [0] * n
for i in A:
  lis[i-1] += 1

for j in range(len(lis)):
  print(lis[j])
import statistics
n = int(input())
a = [int(i) for i in input().split()]

m = ((sum(a)/n)*2 + 1) //2
# m = statistics.mean(a)
# m = int(m) + 1 if m % 1 > 0.5 else int(m)
r = 0
for i in a:
  r += (i - m)**2
  
print(r)


### FIXED CODE ###

N = int(input())
if N % 2 == 0:
  r = (N + 1) * N / 2
else:
  r = N * (N - 1) / 2 + N

print(int(r))
N,X=map(int,input().split())

from math import gcd

N, X = map(int, input().split())
x_list = list(map(int, input().split()))

kyori_list = [abs(X-i) for i in x_list]

ans_gcd = kyori_list[0]
for i in kyori_list[1:]:
    ans_gcd = gcd(ans_gcd, i)
print(ans_gcd)

### FIXED CODE ###

from fractions import gcd
N, X = map(int, input().split())
x_list = list(map(int, input().split()))
kyori_list = [abs(X-i) for i in x_list]
ans_gcd = kyori_list[0]
for i in kyori_list[1:]:
    ans_gcd = gcd(ans_gcd, i)
print(ans_gcd)
n = int(input())
v = list(map(int,input().split()))

odd = []
even = []

if len(set(v)) == 1:
    print(n//2)
    exit()

for i in range(n):
    if i%2 == 0:
        even.append(v[i])
    else:
        odd.append(v[i])

box_e = [0]*int(1e5)
box_o = [0]*int(1e5)

for i in range(n//2):
    box_e[even[i]] += 1
    box_o[odd[i]] += 1

mode_e = box_e.index(max(box_e))
mode_o = box_o.index(max(box_o))

ans = 0

for i in range(n//2):
    if odd[i] != mode_o:
        ans += 1
    if even[i] != mode_e:
        ans += 1

print(ans)

### FIXED CODE ###

from collections import Counter

def main():
    
    N = int(input())
    V = list(map(int,input().split()))
    odd = V[1::2]
    even = V[0::2]
    mode_o = Counter(odd).most_common()
    mode_o.append([0,0])
    mode_e = Counter(even).most_common()
    mode_e.append([0,0])
    ans = 0
    if mode_o[0][0] != mode_e[0][0]:
        ans = N-mode_o[0][1]-mode_e[0][1]
    else:
        ans = N - max(mode_e[0][1]+mode_o[1][1],mode_e[1][1]+mode_o[0][1])
    print(ans)

if __name__ == "__main__":
    main()
from collections import Counter
n = int(input())
A = sorted(map(int, input().split()))

c = Counter(A)

yes_or_no = [1 for i in range(A[n-1])]

for a in A:
  t = a*2
  while t <= A[n-1]:
    yes_or_no[t] = 0
    t += a
ans = 0
for a in A:
  if c[a] == 1 and yes_or_no[a] == 1:
    ans += 1
print(ans)

### FIXED CODE ###

from collections import Counter
n = int(input())
A = sorted(map(int, input().split()))

c = Counter(A)

yes_or_no = [True for i in range(A[n-1]+1)]

for a in A:
  t = a*2
  while t <= A[n-1]:
    yes_or_no[t] = False
    t += a
ans = 0
for a in A:
  if c[a] == 1 and yes_or_no[a] == True:
    ans += 1
print(ans)
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(): return list(imap())
def farr(): return list(fmap())
def sarr(): return sinput().split()

n,a = imap()
x = np.array(iarr()) - a

# 和は -49*nから49*nまでで、49たせば0 - 98の９９個
# 和０のときは49*nたして、dp[n][0+50*n]が答え
dp = np.zeros((n+1, 100))
dp[0, :] = 1

for i in range(n):
    for s in range(100):
        dp[i+1][s] = dp[i][s] + dp[i][s-x[i]] if s-x[i]>=0 else dp[i][s]
print(dp)


### FIXED CODE ###

import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(): return list(imap())
def farr(): return list(fmap())
def sarr(): return sinput().split()

n,a = imap()
x = np.array(iarr()) - a

# dp[i][和 + NA]
# 本来のSの範囲は、1N-NAから50N-NA
# 負の数はdp範囲外なのでNAたすと、1Nから50N
# 和０のときは dp[n][0+NA]
dp = np.zeros((n+1, 50*n+100)).astype(int)
dp[0][n*a] = 1

for i in range(n):
    for s in range(50*n+1):
        dp[i+1][s] = dp[i][s] + dp[i][s-x[i]] if s-x[i]>=0 else dp[i][s]

ans = dp[n][n*a] - 1 #実際は初期条件の０個選ぶパターンを除外
print(ans)
N, K = map(int, input().split())

def prepare(N, MOD):
    fac = [None] * (N+1)
    finv = [None] * (N+1)
    inv = [None] * (N+1)
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, N+1):
        fac[i] = fac[i - 1] * i % MOD
        inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD
        finv[i] = finv[i - 1] * inv[i] % MOD
    return fac, finv

def comb_rem(N, K, fac, finv, MOD):
    if N < K:
        return 0
    if N < 0 or K < 0:
        return 0
    else:
        return fac[N] * (finv[K] * finv[N - K] % MOD) % MOD

MOD = 10 ** 9 + 7

for i in range(1, K+1):
    ans = 1
    fac, finv = prepare(N-K+1, MOD)
    a = comb_rem(N-K+1, i, fac, finv, MOD)
    fac, finv = prepare(K-1, MOD)
    b = comb_rem(K-1, i-1, fac, finv, MOD)
    ans *= a * b % MOD
    print(ans)

### FIXED CODE ###

N, K = map(int, input().split())

def prepare(N, MOD):
    fac = [None] * (N+2)
    finv = [None] * (N+2)
    inv = [None] * (N+2)
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, N+1):
        fac[i] = fac[i - 1] * i % MOD
        inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD
        finv[i] = finv[i - 1] * inv[i] % MOD
    return fac, finv

def comb_rem(N, K, fac, finv, MOD):
    if N < K:
        return 0
    if N < 0 or K < 0:
        return 0
    else:
        return fac[N] * (finv[K] * finv[N - K] % MOD) % MOD

MOD = 10 ** 9 + 7

for i in range(1, K+1):
    ans = 1
    fac, finv = prepare(N-K+1, MOD)
    a = comb_rem(N-K+1, i, fac, finv, MOD)
    fac, finv = prepare(K-1, MOD)
    b = comb_rem(K-1, i-1, fac, finv, MOD)
    ans *= a * b % MOD
    print(ans)
N, M = map(int, input().split())
data = [[] for i in range(M)]
ans = [""] * M
num = [0] * M
for i in range(M):
    ken, year = map(int, input().split())
    data[i] = [ken, year, i]
    
data.sort(key=lambda x:x[1])

for p, y, i in data:
    num[p-1] += 1
    ans[i] = (str(p).zfill(6) + str(num[p]).zfill(6))

for i in ans:
    print(i)

### FIXED CODE ###

N, M = map(int, input().split())
cnt = [0 for i in range(N + 1)] 
check = []
ans = []

for i in range(M):
    p, y = map(int, input().split())
    check.append((y, p, i))

check.sort()

for y, p, i in check:
    cnt[p] += 1
    ans.append((i,str(p).zfill(6)+str(cnt[p]).zfill(6)))

ans.sort()

for aa, bb in ans:
    print(bb)
import sys


def input():
    return sys.stdin.readline().strip()


def div_cnt(n, d):
    res = 0
    while n % d == 0:
        res += 1
        n //= d
    return res


N = int(input())
A = list(int(float(input()) * 1_000_000_000) for _ in range(N))
divs = [(div_cnt(a, 2), div_cnt(a, 5)) for a in A]

table = [[0] * 19 for _ in range(19)]
for t, f in divs:
    table[t][f] += 1

ans = 0
for t, f in divs:
    for i in range(19):
        for j in range(19):
            if t + i >= 18 and f + j >= 18:
                ans += table[i][j]
                if t == i and f == j:
                    ans -= 1

print(ans // 2)


### FIXED CODE ###

import sys

import numpy as np
from numba import njit, i8


def input():
    return sys.stdin.readline().strip()


def convert(S):
    i, *d = S.split(".")
    i = int(i) * 1_000_000_000
    if d:
        return i + int(d[0].ljust(9, "0"))
    else:
        return i


def div_cnt(n, d):
    res = 0
    while n % d == 0:
        res += 1
        n //= d
    return res


@njit(i8(i8[:, :]), cache=True)
def solve(table):
    ans = 0
    for i in range(19):
        for j in range(19):
            cur = table[i][j]
            if cur == 0:
                continue
            for k in range(18 - i, 19):
                for l in range(18 - j, 19):
                    if k == i and j == l:
                        ans += cur * (cur - 1)
                    else:
                        ans += cur * table[k][l]
    return ans


N = int(input())
A = list(convert(input()) for _ in range(N))
divs = [(div_cnt(a, 2), div_cnt(a, 5)) for a in A]

table = np.zeros((19, 19), np.int64)
for t, f in divs:
    table[min(t, 18)][min(f, 18)] += 1
print(solve(table) // 2)
a,b = map(int, input().split())
if a==0 or b==0 or (a<0 and b>0):
    print(0)
elif b<0 and (b-a)%2==0:
    print('Negative')
else:
    print('Positive')

### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
ans = 0
m = 200001
for i in p:
    if i<m:
        ans+=1
        m=i
print(ans)
s1,s2,s3=input().split().capitalize() #文字列
print(s1[0]+s2[0]+s3[0])

### FIXED CODE ###

s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])
h,w,a,b=map(int,input().split())
if a*w!=b*h:
    if h==1 and b==0:
        print("1"*b+"0"*(w-b))
    elif w==1 and a==0:
        for i in range(h):
            if i<b:
                print(1)
            else:
                print(0)
    else:
        print("No")
else:
    s="1"*a+"0"*(h-a)
    for i in range(w):
        print(s)
        if i%b==0:
            s="0"*a+s
            s=s[:-a]

### FIXED CODE ###

h,w,a,b=map(int,input().split())
for i in range(h):
    if i<b:
        print("0"*a+"1"*(w-a))
    else:
        print("1"*a+"0"*(w-a))
a = int(input())
return a ** 3

### FIXED CODE ###

x = int(input())
print (x ** 3)
a = int(input())
ar = []
for i in range(a):
    ar.append(l)
print(len(set(ar)))

### FIXED CODE ###

a = int(input())
ar = []
for i in range(a):
    l = input()
    ar.append(l)
print(len(set(ar)))
A, op, B = input(),split()
if op == '+':
  print(int(A)+int(B))
if op == '-':
  print(int(A)-int(B))

### FIXED CODE ###

A, op, B = input().split()
if op is '+':
  print(int(A)+int(B))
if op is '-':
  print(int(A)-int(B))
s, t = input().split()
count = 0

for i in range(s):
  if s[i] != t[0]:
    count += 1
    
 print(count)

### FIXED CODE ###

s = list(input())
t = list(input())
count = 0

for i in range(len(s)):
  if s[i] != t[i]:
    count += 1

print(count)
N=map(int, input())
list=list(map(str, input().split()))
answer=[]
for i in range(1, N-2):
	answer.append(list.count(i))
a_s='\n'.join(answer)
print(a_s)

### FIXED CODE ###

N=int(input())
A=list(map(int, input().split()))
ans=[0]*N
for a in A:
  ans[a-1]+=1
for n in ans:
  print(n)
a,b=map(int,input().split())
if a*b%2=0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

a,b=map(int,input().split())
if a*b%2:
  print('Odd')
else:
  print('Even')
import math
n, k = map(int, input().split())

if k == 1:
    print(0)
    exit()

gcd = math.gcd(n, k)
print(gcd)

### FIXED CODE ###

n, k = map(int, input().split())

if k == 1:
    print(0)
    exit()
    
if n > k:
    n = n%k
    print(min(n, abs(n-k)))
else:
    print(min(n, abs(n-k)))
from itertools import *
X,Y = map(int,input().split())
if X*2 == Y:
    print("Yes")
elif X*4 == Y:
    print("Yes")
else:
    tmp = [2 for i in range(25)]+[4 for i in range(25)]
    li = set(combinations(tmp,X))
    for i in li:
        if sum(i) == Y:
            print("Yes")
            exit()
    print("No")


### FIXED CODE ###

print(list(map(int,input().split())).index(0)+1)
N, K, S = map(int, input().split())

mawari = S // K
mid = S // K + S % K

ans = []

for i in range(K-1):
    ans.append(mawari)

ans.append(mid)

for i in range(K-1):
    ans.append(mawari)

for i in range(N - len(ans)):
    ans.append(S)

print(*ans)


### FIXED CODE ###

N, K, S = map(int, input().split())

ans = []
for i in range(K):
    ans.append(S)
    
for i in range(N - len(ans)):
    ans.append(10**9-1)

print(*ans)
import re,sys
def chk(t):
    for i in range(10):
        if eval(re.sub("X",str(i),t)):
            return i
    return 10

l=[chk(i.replace("=","==")) for i in sys.stdin]
[print(i) if i != 10 else print("NA") for i in l]



### FIXED CODE ###

import re,sys
def chk(t):
    for i in range(10):
        e=re.split("[+=]",re.sub("X",str(i),t))
        if (e[0][0]=="0" and len(e[0])>1) or (e[1][0]=="0" and len(e[1])>1) or (e[2][0]=="0" and len(e[2])>1): continue
        if eval(e[0]+"+"+e[1]) == eval(e[2]):
            return i
    return 10

l=[chk(i.strip()) for i in sys.stdin]
[print(i) if i != 10 else print("NA") for i in l]
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
if a[i] % 2 == 1:
ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
ans=0
for i in range(0, N, 2):
    if A[i]%2==1:
        ans+=1
print(ans)
n, a, b = map(int, input().split())
s = ''
for i in range(n):
    s += 'b'*a + 'r'*b
    if len(s) >= n: break
print(s[:n].count('b'))

### FIXED CODE ###

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

if a == 0:
    print(0)
elif a+b >= n:
    print(a) if a <= n else print(n)
else:
    ab = a + b
    ans = n // ab * a
    ans += a if n % ab > a else n % ab 
    print(ans)
a,b,c = [input().split() for i in range(3)]

a.extend(b)
a.extend(c)
b = [input() for i in range(10)]
for b1 in b:
    a = ['a' if b1 == s in s else s for s in a]

if a[0] == 'a' and a[1] == 'a' and a[2] == 'a':
    print("Yes")
elif a[3] == 'a' and a[4] == 'a' and a[5] == 'a':
    print("Yes")
elif a[6] == 'a' and a[7] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[3] == 'a' and a[6] == 'a':
    print("Yes")
elif a[1] == 'a' and a[4] == 'a' and a[7] == 'a':
    print("Yes")
elif a[2] == 'a' and a[5] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[4] == 'a' and a[8] == 'a':
    print("Yes")
elif a[2] == 'a' and a[4] == 'a' and a[6] == 'a':
    print("Yes")


### FIXED CODE ###

a,b,c = [input().split() for i in range(3)]

a.extend(b)
a.extend(c)
N = int(input())
b = [input() for i in range(N)]
for b1 in b:
    a = ['a' if b1 == s in s else s for s in a]

if a[0] == 'a' and a[1] == 'a' and a[2] == 'a':
    print("Yes")
elif a[3] == 'a' and a[4] == 'a' and a[5] == 'a':
    print("Yes")
elif a[6] == 'a' and a[7] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[3] == 'a' and a[6] == 'a':
    print("Yes")
elif a[1] == 'a' and a[4] == 'a' and a[7] == 'a':
    print("Yes")
elif a[2] == 'a' and a[5] == 'a' and a[8] == 'a':
    print("Yes")
elif a[0] == 'a' and a[4] == 'a' and a[8] == 'a':
    print("Yes")
elif a[2] == 'a' and a[4] == 'a' and a[6] == 'a':
    print("Yes")
else:
    print("No")
a,b,c = [int(i) for i in input() split()]
if a < b < c:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c = [int(i) for i in input().split()]
if a < b < c:
  print('Yes')
else:
  print('No')
n = int(input())
a = list(map(int, input().split()))
lsa = []
lsb = []
for i in range(0, n, 2):
    lsa.append(a[-i-1])
for i in range(0 if n % 2 == 0 else 1, n, 2):
    lsb.append(a[i])
print(*lsa, *lsb)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ls = []
for i in range(0, n, 2):
    ls.append(a[-i-1])
for i in range(0 if n % 2 == 0 else 1, n, 2):
    ls.append(a[i])
print(*ls)
from sys import stdin

T = stdin.readline().rstrip()
X = stdin.readline().rstrip()

print(float(T)/float(X))

### FIXED CODE ###

T,X =map(int, input().split())
print(float(T)/float(X))
N,R=int(input().split())
ans=0
if N>=10:
  ans=R
  
else:
  ans=R+100*(10-N)
 
print(ans)


### FIXED CODE ###

N,R=map(int,input().split())
ans=0
if N>=10:
  ans=R
  
else:
  ans=R+100*(10-N)
 
print(ans)
N = int(input())
S = input()
count = 0

for i in range(N-2):
    if S[i]=='A' and S[i+1]=='B' and S[i+2]=='C':
        count += 1

print(count)

### FIXED CODE ###

K,X = map(int, input().split())

if K*500>=X:
    print('Yes')
else:
    print('No')
s=input().split()
if s[0] != s[1] or s[1] != s[2]:
    print("Yes)
else:
    print("No)

### FIXED CODE ###

s=list(input())
if s[0] != s[1] or s[1] != s[2]:
    print("Yes")
else:
    print("No")
n = int(input())
a = list(map(int,input().split()))
a = sorted(a)
def gcd(a,b):
  c = a%b
  if c == 0:
    return b
  0else:
    return gcd(b,c)
c = 0
for i in a[1:]:
  c_ = gcd(i,a[0])
  if c_ == 1:
    c = 1
    break
  else:
    if c_ < c or c == 0:
      c = c_
print(c)


### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
a = sorted(a)
def gcd(a,b):
  c = a%b
  if c == 0:
    return b
  else:
    return gcd(b,c)
c = 0
for i in a[1:]:
  c_ = gcd(i,a[0])
  if c_ == 1:
    c = 1
    break
  else:
    if c_ < c or c == 0:
      c = c_
print(c)
n,m=map(int,input().split())

def conbi(arg1, arg2):
    k=1
    l=1
    if arg2>arg1/2:
        arg2=arg1-arg2
    for i in range(arg2):
        k=k*(arg1-i)
        l=l*(i+1)
    if arg1==0:
        return 1
    else:
        return k/l
        
for o in range(1,m+1):
    print(int((conbi(n-m+1,o)%(1000000007))*(conbi(m-1,o-1)%(1000000007))))

### FIXED CODE ###

s=input()
st=[]
d=[]
for i in s:
    if i in d:
        st[d.index(i)]+=1
    else:
        d.append(i)
        st.append(1)

if len(st)==2 & st[0]==2 & st[1]==2:
    print('Yes')
else:
    print('No')
temp = []
a,b,k = map(int,input().split())
for i in range (1, min(a,b)):
  if a%i==0 and b%i==0:
    temp.append(i)
print(temp[k-1])


### FIXED CODE ###

temp = []
a,b,k = map(int,input().split())
for i in range (1, min(a,b)+1):
  if a%i==0 and b%i==0:
    temp.append(i)
print(temp[-k])
a, b = imput().split()
c = [a + b, a - b, a * b]
print(max(c))

### FIXED CODE ###

a, b = map(int, input().split())
c = [a + b , a - b, a * b]
print(max(c))