Harryxun/stf_run huggingface dataset:
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
l = list(zip(a, b))
l.sort(key=lambda x: x[1])
a.sort()
s = list(set(a))
d = dict()
for i, x in enumerate(s):
    d[x] = i
b.sort()
for i in range(n):
    if a[i] > b[i]:
        print('No')
        exit(0)
for i in range(n - 1):
    if a[i + 1] <= b[i]:
        print('Yes')
        exit(0)
al = [d[x[0]] for x in l]
cnt = 0
t = al[0]
while t != 0:
    t = al[t]
    cnt += 1
if cnt == n - 1:
    print('No')
else:
    print('Yes')
    exit(1)


### FIXED CODE ###

class UnionFindNode(object):
    """
    Union-Find構造
    ノードのグループ併合や、所属グループ判定を高速に処理する
    """

    def __init__(self, group_id, parent=None, value=None):
        self.group_id_ = group_id
        self.parent_ = parent
        self.value = value
        self.size_ = 1

    def __str__(self):
        template = "UnionFindNode(group_id: {}, \n\tparent: {}, value: {}, size: {})"
        return template.format(self.group_id_, self.parent_, self.value, self.size_)

    def is_root(self):
        return not self.parent_

    def root(self):
        parent = self
        while not parent.is_root():
            parent = parent.parent_
            self.parent_ = parent
        return parent

    def find(self):
        parent = self.root()
        return parent.group_id_

    def size(self):
        parent = self.root()
        return parent.size_

    def unite(self, unite_node):
        parent = self.root()
        unite_parent = unite_node.root()

        if parent.group_id_ != unite_parent.group_id_:
            if parent.size() > unite_parent.size():
                unite_parent.parent_ = parent
                parent.size_ = parent.size_ + unite_parent.size_
            else:
                parent.parent_ = unite_parent
                unite_parent.size_ = parent.size_ + unite_parent.size_

    def same(self, node):
        return self.root() == node.root()


n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
l = list(zip(a, b))
l.sort(key=lambda x: x[1])
a.sort()
d = dict()
for i, x in enumerate(a):
    d[x] = i
b.sort()
for i in range(n):
    if a[i] > b[i]:
        print('No')
        exit(0)
for i in range(n - 1):
    if a[i + 1] <= b[i]:
        print('Yes')
        exit(0)
uf = [UnionFindNode(i) for i in range(n)]
al = [d[x[0]] for x in l]
for i in range(n):
    uf[i].unite(uf[al[i]])
if uf[0].root().size() == n:
    print('No')
else:
    print('Yes')
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))

import itertools
a = list(itertools.permutations([i for i in range(1, n+1)]))
print(abs(a.index(p)-a.index(q)))


### FIXED CODE ###

n = int(input())
p = tuple(map(int, input().split()))
q = tuple(map(int, input().split()))

import itertools
a = list(itertools.permutations([i for i in range(1, n+1)]))
print(abs(a.index(p)-a.index(q)))
N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
        P[b[j]-1] = 1
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

### FIXED CODE ###

n, k = map(int, input().split())
 
m = [0]*n
 
for i in range(k):
    d = int(input())
    a = [int(x) for x in input().split()]
    for j in range(d):
        m[a[j]-1] += 1
 
print(m.count(0))
n,m = map(int,input().split())

rest = []
for i in range(m):
    a,b = input().split()
    rest.apend((int(a),b))

done = False

for i in range(0,1000):
    x = str(i)
    if (len(x) == n):
        ok = True
        for t in rest:
            if (x[t[0] - 1] != t[1]):
                ok = False
                break
        if ok:
            print(i)
            done = True

if not done:
    print(-1)

### FIXED CODE ###

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

rest = []
for i in range(m):
    a,b = input().split()
    rest.append((int(a),b))

done = False

for i in range(0,1000):
    x = str(i)
    if (len(x) == n):
        ok = True
        for t in rest:
            if (x[t[0] - 1] != t[1]):
                ok = False
                break
        if ok:
            print(i)
            done = True
            break

if not done:
    print(-1)
import sys
sys.setrecursionlimit(10**9)

def neighbor(a):
    if a == 0:
        return [0,1]
    if a == 9:
        return [8,9]
    return [a-1,a,a+1]

def make_lunlun(digit, start):
    if digit == 1:
        return [start]
    res = []
    for start_neighbor in neighbor(start):
        b = make_lunlun(digit-1, start_neighbor)
        c = list(map(lambda x:x+(start*(10**(digit-1))), b))
        res.extend(c)
    return res
lunlun = []
for i in range(1,11):
    for j in range(1,10):
        lunlun.extend(make_lunlun(i, j))

k = int(input())
print(lunlun[k-1])


import sys
sys.setrecursionlimit(10**9)

def neighbor(a):
    if a == 0:
        return [0,1]
    if a == 9:
        return [8,9]
    return [a-1,a,a+1]

def make_lunlun(digit, start):
    if digit == 1:
        return [start]
    res = []
    for start_neighbor in neighbor(start):
        b = make_lunlun(digit-1, start_neighbor)
        c = list(map(lambda x:x+(start*(10**(digit-1))), b))
        res.extend(c)
    return res
lunlun = []
for i in range(1,11):
    for j in range(1,10):
        lunlun.extend(make_lunlun(i, j))

k = int(input())
print(lunlun[k-1])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

def neighbor(a):
    if a == 0:
        return [0,1]
    if a == 9:
        return [8,9]
    return [a-1,a,a+1]

def make_lunlun(digit, start):
    if digit == 1:
        return [start]
    res = []
    for start_neighbor in neighbor(start):
        b = make_lunlun(digit-1, start_neighbor)
        c = list(map(lambda x:x+(start*(10**(digit-1))), b))
        res.extend(c)
    return res
lunlun = []
for i in range(1,11):
    for j in range(1,10):
        lunlun.extend(make_lunlun(i, j))

k = int(input())
print(lunlun[k-1])
N = int(input())
*A, = map(int, input().split())
print(A)
B = []
for i in A:
  if i % 2 == 0:
    B.append(i)
C = 0
for l in B:
  if l % 5 == 0 or l % 3 == 0:
    C = C + 1
 
if C/len(B) == 1:
  print('APPROVED')
else:
  print('DENIED')

### FIXED CODE ###

N = int(input())
*A, = map(int, input().split())
B = []
C = 0
for i in A:
  if i % 2 == 0:
    B.append(i)
    if i % 5 == 0 or i % 3 == 0:
      C += 1
 
if C == len(B):
  print('APPROVED')
else:
  print('DENIED')
dp = {}
def util(adj, curr):
    if curr in dp:
        return dp[curr]
    res = 0
    for next in adj[curr]:
        res = max(res, 1 + util(adj, next))
    dp[curr] = res
    return res

n, m = map(int, input().split())
adj = {}
for _ in range(m):
    x, y = map(int, input().split())
    if x in adj:
        adj[x].append(y)
    else:
        adj[x] = [y]

lp = 0
for i in range(1, n + 1):
    lp = max(lp, util(adj, i))
print(lp)

### FIXED CODE ###

import sys
sys.setrecursionlimit(11000)
def util(adj, curr, dp):
    res = 0
    if dp[curr] != -1:
        return dp[curr]
    for next in adj[curr]:
        res = max(res,1 + util(adj, next, dp))
    dp[curr] = res
    return res
 
n, m = map(int, input().strip().split())
adj = [[] for _ in range(n)]
for _ in range(m):
    x, y = map(int, input().strip().split())
    adj[x - 1].append(y - 1)
dp = [-1]*n
lp = 0
for i in range(n):
    lp = max(lp, util(adj, i, dp))
print(lp)
import sys
input = sys.stdin.readline

S = input()
Q = int(input())
A = [(input().split("")) for _ in range(Q)]

for i in range(Q):
  if A[i] == ["1"]:
    S = ''.join(list(reversed(S)))
  else:
    if A[i][1] == "1":
      S = A[i][2] + S
    else:
      S = S + A[i][2] 
      
print(S)
    


### FIXED CODE ###

s = input()
q = int(input())
par = 0
pre = ""
pos = ""

for i in range(q):
  t = input().split()
  if t[0] == "1":
    par += 1
  elif (par + int(t[1]))%2 == 1:
    pre = t[2] + pre
  else:
    pos = pos + t[2]
    
ans = pre + s + pos

if par%2 == 0:
  print(ans)
else:
  print(ans[::-1])
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 == 0:
    print("Even")
else:
    print("Odd")
# AOJ GRL_1_A
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_A

import sys

INF = 100000000

def solve(v, dic):
    dp = []
    for i in range(0, v):
        dp += [[INF] * v ]
        for t, d in dic[i]:
            dp[i][t] = d
        dp[i][i] = 0
    for k in range(0, v):
        for i in range(0, v):
            for j in range(0, v):
                if dp[i][j] > dp[i][k] + dp[k][j]:
                    dp[i][j] = dp[i][k] + dp[k][j]
    return dp

dic = {}
dp = []
line = input()
v, e, r = list(map(int, list(line.split())))
for _ in range(0, e):
    line = input()
    s, t, d = list(map(int, list(line.split())))
    if s not in dic:
        dic[s] = [[t, d]]
    else:
        dic[s] += [[t, d]]
dp = solve(v, dic)
for i in range(0, v):
    print(dp[r][i] if dp[r][i] != INF else "INF")


### FIXED CODE ###

# AOJ GRL_1_A
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_A

from heapq import heappush, heappop

INF = 10000000000

def solve(r, v, dic):
    dp = []
    q = []
    dp = [INF] * v
    dp[r] = 0
    heappush(q, (0, r))
    while q:
        cost, vtx = heappop(q)
        if dp[vtx] < cost:
            continue
        if vtx not in dic:
            continue
        for vtx1, cost1 in dic[vtx]:
            if cost + cost1 < dp[vtx1]:
                dp[vtx1] = cost + cost1
                heappush(q, (cost + cost1, vtx1))
    return dp

dic = {}
dp = []
line = input()
v, e, r = list(map(int, line.split()))
for _ in range(0, e):
    line = input()
    s, t, d = list(map(int, line.split()))
    if s not in dic:
        dic[s] = [[t, d]]
    else:
        dic[s] += [[t, d]]
dp = solve(r, v, dic)
for t in range(0, v):
    print(dp[t] if dp[t] != INF else "INF")
list = map(int,raw_input().split())
W = list[0] 
H = list[1] 
x = list[2]
y = list[3]
r = list[4]

if x-r < 0:
    print("No")
elif x + r > W:
    print("No")
elif y-r < 0:
    print("No")
elif y+r > H:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

W,H,x,y,r = [int(i) for i in input().split(" ")]

print("No" if x < r or y < r or x + r > W or y + r > H else "Yes" )
N = int(input())
total = 0
for i in range(1,N+1):
	if i%3!=0 and i%5!=0:
    	total = total + 1
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)
def main():
	n, q = map(int, input().split())
	s = input()
	acs = [0]*(n+1)
	for i in range(1, n+1):
		if s[i-1] == "A" and s[i] == "C":
			acs[i] = acs[i-1] + 1
		else:
			acs[i] = acs[i-1]
	results = [0]*q
	for i in range(q):
		l, r = map(int, input().split())
		results[i] = acs[r] - acs[l]
		if s[r-1] == "A" and l != r:
			results[i] -= 1
		if s[l-1] == "A" and l != r:
			results[i] += 1
	for result in results:
		print(result)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
	n, q = map(int, input().split())
	s = input()
	acs = [0]*(n)
	for i in range(1, n):
		if s[i-1] == "A" and s[i] == "C":
			acs[i] = acs[i-1] + 1
		else:
			acs[i] = acs[i-1]
	results = [0]*q
	for i in range(q):
		l, r = map(int, input().split())
		if l == r:
			continue
		results[i] = acs[r-1] - acs[l-1]
	for result in results:
		print(result)

if __name__ == '__main__':
    main()
n, m = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

mod = 10**9+7

A_ = set(A)
B_ = set(B)

if len(A) != len(A_) or len(B) != len(B_):
    print(0)
    exit()

A.sort()
B.sort()

import bisect

ans = 1
for i in reversed(range(1, n*m+1)):
    if i in A_ and i in B_:
        ans *= 1
    elif i in A_ and i not in B_:
        ans *= (len(B)-bisect.bisect_left(B, i))
    elif i not in A_ and i in B_:
        ans *= (len(A)-bisect.bisect_left(A, i))
    else:
        b = len(B)-bisect.bisect_left(B, i)
        ans *= a*b-(len(A)*len(B)-i)
    ans %= mod
print(ans)

### FIXED CODE ###

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

mod = 10**9+7

A_ = set(A)
B_ = set(B)

if len(A) != len(A_) or len(B) != len(B_):
    print(0)
    exit()

A.sort()
B.sort()

import bisect

ans = 1
for i in reversed(range(1, n*m+1)):
    if i in A_ and i in B_:
        ans *= 1
    elif i in A_ and i not in B_:
        ans *= (len(B)-bisect.bisect_left(B, i))
    elif i not in A_ and i in B_:
        ans *= (len(A)-bisect.bisect_left(A, i))
    else:
        a = len(A)-bisect.bisect_left(A, i)
        b = len(B)-bisect.bisect_left(B, i)
        ans *= a*b-(len(A)*len(B)-i)
    ans %= mod
    
print(ans)
init_input()

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

found = {}
for i, a in enumerate(A):
    if a in found:
        dup = a
        dup_1 = found[a]
        dup_2 = i
    found[a] = i

from functools import lru_cache

@lru_cache(maxsize=None)
def gfp_inv(x, p):
    return pow(x, p - 2, p)

@lru_cache(maxsize=None)
def fact(n, m, p):
    ret = 1
    for i in range(m, n + 1):
        ret = (ret * i) % p
    return ret

def comb(n, m):
    if m < 0 or n < m: return 0
    if n == m: return 1
    return fact(n, n - m + 1, p) * gfp_inv(fact(m, 1, p), p) % p

p = 10**9 + 7

intv = dup_2 - dup_1 - 1
for k in range(1, n + 2):
    ans = comb(n + 1, k)
    ans -= comb(n + 1 - intv - 2, k - 1)
    print(ans % p)

### FIXED CODE ###

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

p = 10**9 + 7

found = {}
for i, a in enumerate(A):
    if a in found:
        dup = a
        dup_1 = found[a]
        dup_2 = i
    found[a] = i

from functools import lru_cache

@lru_cache(maxsize=None)
def gfp_inv(x, p):
    return pow(x, p - 2, p)

from itertools import chain, accumulate
memo_fact = list(chain([1], accumulate(range(1, 10**5 + 2), lambda a, x: a * x % p)))

def comb(n, m):
    if m < 0 or n < m: return 0
    if n == m: return 1
    return memo_fact[n] * gfp_inv(memo_fact[n - m], p) * gfp_inv(memo_fact[m], p) % p

intv = dup_2 - dup_1 - 1
for k in range(1, n + 2):
    ans = comb(n + 1, k)
    ans -= comb(n + 1 - intv - 2, k - 1)
    print(ans % p)
import numpy as np
ans=0
n=int(input())
li=list(map(int,input().split()))
for i in range(1,n):
    L=li
    k=np.cumsum(L[:i])
    ans+=k*li[i]
print(ans%(10**9+7))

### FIXED CODE ###

import itertools
ans=0
n=int(input())
li=list(map(int,input().split()))
L=list(itertools.accumulate(li))
for i in range(1,n):
    ans+=L[i-1]*li[i]
print(ans%(10**9+7))
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし


N = I()
X = LI2()
X.reverse()

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

A = [0]*(2*10**5+1)  # Ai = f(i)
for i in range(1,2*10**5+1):
    k = 0
    for j in range(18):
        if (i >> j) & 1:
            k += 1
    A[i] = A[i % k] + 1


r = sum(X)  # Xの各桁の和

if r >= 2:
    B = [1] + [0]*(N-1)  # Bi = 2**i mod (r-1)
    C = [1] + [0]*(N-1)  # Ci = 2**i mod (r+1)
    b,c = 0,0  # b,c = X mod (r-1),X mod (r+1)
    for i in range(1,N):
        B[i] = (B[i-1]*2) % (r-1)
        C[i] = (C[i-1]*2) % (r+1)
        if X[i] == 1:
            b += B[i]
            b %= r-1
            c += C[i]
            c %= r+1

    for i in range(N-1,-1,-1):
        if X[i] == 0:
            print(1+A[(c+C[i]) % (r-1)])
        else:
            print(1+A[(b-B[i]) % (r+1)])

else:
    C = [1] + [0]*(N-1)  # Ci = 2**i mod (r+1)
    c = 0  # c = X mod (r+1)
    for i in range(1,N):
        C[i] = (C[i-1]*2) % (r+1)
        if X[i] == 1:
            c += C[i]
            c %= r+1

    for i in range(N-1,-1,-1):
        if X[i] == 0:
            print(1+A[(c+C[i]) % (r-1)])
        else:
            print(0)


### FIXED CODE ###

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N = I()

A = [0]
for i in range(1,2*10**5):
    a = 0
    r = i
    for j in range(18):
        a += (i>>j)&1
    r %= a
    if r == 0:
        A.append(1)
    else:
        A.append(1+A[r])

X = LS2()

b = 0
for i in range(N):
    if X[i] == '1':
        b += 1
if b >= 2:
    c = b-1
    d = b+1

    r1 = 0
    r2 = 0

    amari1 = [1]
    amari2 = [1]
    for i in range(1,N):
        amari1.append((amari1[-1]*2) % c)
        amari2.append((amari2[-1]*2) % d)
    amari1.reverse()
    amari2.reverse()
    for i in range(N):
        if X[i] == '1':
            r1 += amari1[i]
            r1 %= c
            r2 += amari2[i]
            r2 %= d
    ANS = []
    for i in range(N):
        if X[i] == '1':
            e = r1
            e -= amari1[i]
            e %= c
            ANS.append(A[e]+1)
        else:
            f = r2
            f += amari2[i]
            f %= d
            ANS.append(A[f]+1)
else:
    d = b + 1
    r2 = 0


    amari2 = [1]
    for i in range(1, N):
        amari2.append((amari2[-1] * 2) % d)
    amari2.reverse()

    for i in range(N):
        if X[i] == '1':

            r2 += amari2[i]
            r2 %= d
    ANS = []
    for i in range(N):
        if X[i] == '1':

            ANS.append(0)
        else:
            f = r2
            f += amari2[i]
            f %= d
            ANS.append(A[f] + 1)


print(*ANS,sep='\n')
K,X=map(int,input().split( ))
for i in range(-K+1,K):
  kuro = X+i
  print(kuro if (kuro >= -1000000 and kuro <= 1000000))

### FIXED CODE ###

K,X=map(int,input().split())
for i in range(-K+1,K):
  kuro = X+i
  if kuro >= -1000000 and kuro <= 1000000:
     print(kuro)
N, M, Q, *ABCD = map(int, open(0).read().split())

L = list(zip(*[iter(ABCD)] * 4))

def solve(A):
    if len(A) == M:
        return sum(d for a, b, c, d in L if A[b - 1] - A[a - 1] == c)

    return max((solve(A + [i]) for i in range(A[-1], M + 1)), default=0)

print(solve([1]))

### FIXED CODE ###

from itertools import combinations_with_replacement

N, M, Q, *ABCD = map(int, open(0).read().split())

L = list(zip(*[iter(ABCD)] * 4))

print(max(sum(d for a, b, c, d in L if A[b - 1] - A[a - 1] == c) for A in combinations_with_replacement(range(1, M + 1), N)))
3 3
1
3
1
3
1
3

### FIXED CODE ###

def main():
    ans = 0
    n,k = map(int, input().split())
    l = [0]*n
    for i in range(k):
        d = int(input())
        s = list(map(int, input().split()))
        for j in s:
            l[j-1] += 1
    for i in range(n):
        if l[i] == 0:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()
ans = S.count('R') * S.count('G') * S.count('B')

SN = []

for s in S:
    if s == 'R': SN.append(-1)
    elif s == 'G': SN.append(0)
    else: SN.append(1)

rem2 = ['RRR', 'GGG', 'BBB']

count = 0
for i in range(1, N-1):
    index = i
    left = i - 1
    right = i + 1
    f = True
    while f:
        if left == -1 or right == N:
            break
        if SN[left] == SN[index] and SN[index] == SN[right] == 0 : pass
        elif SN[left] + SN[index] + SN[right] == 0 :
            count+= 1
        
        left -= 1
        right += 1

print(ans-count)


### FIXED CODE ###

#!/usr/bin/env python3

MOD = 10**9
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

N = int(input())
S = input()


ans = S.count('R') * S.count('G') * S.count('B')

SN = []

for s in S:
    if s == 'R': SN.append(-1)
    elif s == 'G': SN.append(0)
    else: SN.append(1)

rem2 = ['RRR', 'GGG', 'BBB']

count = 0
for i in range(1, N-1):
    index = i
    left = i - 1
    right = i + 1
    f = True
    while f:
        if left == -1 or right == N:
            break
        if SN[left] == SN[index] and SN[index] == SN[right] == 0 : pass
        elif SN[left] + SN[index] + SN[right] == 0 :
            count+= 1
        
        left -= 1
        right += 1

print(ans-count)
X=int(input())
print("YES" if X==3or5or7 else "NO")

### FIXED CODE ###

X=int(input())
print("YES" if (X==3)or(X==5)or(X==7) else "NO")
n, m, x, y = map(int, input().split())
x_li = list(map(int, input().split()))
y_li = list(map(int, input().split()))
if  x < y and max(x_li)+1 <= min(y_li):
    print("No War")
else:
    print("Wa

### FIXED CODE ###

n,m,x,y=map(int,input().split())
xl=list(map(int,input().split()))
yl=list(map(int,input().split()))
 
xl.append(x)
yl.append(y)
if max(xl) < min(yl) and x < y:
    print('No War')
else:
    print('War')
hoge = input().split()
i = 0
while i < range(len(hoge)):
  if i%2==0 and hoge[i] == 'L' or 'D' or 'U':
    pass
  elif i%2==1 and hoge[i] == 'R' or 'D' or 'U':
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

import re
hoge = list(input())
i = 0
while i < len(hoge):
    if i%2==0 and re.findall(r'[RDU]',hoge[i]):
        pass
    elif i%2==1 and re.findall(r'[LDU]',hoge[i]):
        pass
    else:
        break
    i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')
a,b,c=(int(x) for x in input().split())

if a=b:
    print(c)
elif b=c:
    print(a)
elif c=a:
    print(b)
else:
    pass


### FIXED CODE ###

a,b,c=(int(x) for x in input().split())

if a==b:
    print(c)
elif b==c:
    print(a)
elif c==a:
    print(b)
else:
    pass
import sys
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [False] * n
now = 0
count = 0
history = [1]

while b[now] == False:
  history.append(a[now])
  b[now] = True
  count += 1
  if count >= k:
    print(a[now])
    sys.exit()
  if a[now]-1 == now:
    print(a[now])
    sys.exit()
  now = a[now]-1


if now != 0:
  k -= now + 1
  history = history[now+1:]
history.pop()
print(history[k % len(history)])


### FIXED CODE ###

n, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [-1] * (n+1)
now = 1
history = []

while b[now] == -1:
  b[now] = len(history)
  history.append(now)
  now = a[now-1]

c = len(history) - b[now]
l = b[now]

if k < l:
  print(history[k])
else:
  k -= l
  k %= c
  print(history[l+k])
A, B, M = map(int, input.split(' '))
a = list(map(int, input.split(' ')))
b = list(map(int, input.split(' ')))
asum = [0]
bsum = [0]
for i in a:
    asum.append(asum[-1] + i)
for i in b:
    bsum.append(bsum[-1] + i)
ans = int(1e18)
for i in range(M):
    x, y, c = map(int, input.split(' '))
    ans = min(ans, asum[x] + bsum[y] - c)
print(ans)

### FIXED CODE ###

A, B, M = map(int, input().split(' '))
a = list(map(int, input().split(' ')))
b = list(map(int, input().split(' ')))
ans = min(a) + min(b)
for i in range(M):
    x, y, c = map(int, input().split(' '))
    ans = min(ans, a[x - 1] + b[y - 1] - c)
print(ans)
n,m = map(int, input().split())
lmax,rmin=0,n+1
for i in range(m):
  l,r=map(int, input().split()
  lmax=max(l,lmax)
  rmin=min(r,rmin)
print(max(0,lmax-rmin+1))

### FIXED CODE ###

n,m = map(int, input().split())
lmax,rmin=0,n+1
for i in range(m):
  l,r=map(int, input().split())
  lmax=max(l,lmax)
  rmin=min(r,rmin)
print(max(0,rmin-lmax+1))
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c

if aa >= bb:
  if abs(aa-bb) % (a[1]-a[0]) == 0:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(a-b) <= t*(v-w):
    print('YES')
else:
    print('NO')
N = int(input())
A = list(map(int,input().split()))
B = []
 
for k in range(N):
    B.append(A[k]-(k+1))

C = sorted(B)

if N%2==0:
    b = C[N//2]
else:
    b = (C[N//2]+C[1+N//2])//2

ans = 0
for k in B:
    ans += abs(k-b)

print(ans)

### FIXED CODE ###

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

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

for k in range(N):
    B.append(A[k]-(k+1))

C = sorted(B)
ans = 0
if N%2==1:
    b = C[N//2]
    for k in B:
        ans += abs(k-b)
else:
    b1 = (C[N//2]+C[-1+N//2])//2
    b2 = 1+(C[N//2]+C[-1+N//2])//2
    ans1 = 0
    ans2 = 0
    for k in B:
        ans1 += abs(k-b1)
        ans2 += abs(k-b2)
    ans = min(ans1,ans2)
print(ans)