Harryxun/stf_run huggingface dataset:
#include<string>
#include<iostream>
using namespace std;

int main () {
	string r1,r2;
	cin >> r1;
	cin >> r2;
	// A B C
	// D E F
	// Rotate 180 Degrees
	// FED, CBA?
	if (r2[2] == r1[0] && r2[1] == r1[1] && r2[0] == r1[2])
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	return 0;
}

### FIXED CODE ###

x = input()
y = input()
z = x[::-1]
if y==z:
        print("YES")
else:
        print("NO")
a = list(map(int, input().split()))

num.sort()
print(a[0], a[1], a[2])

### FIXED CODE ###

num = list(map(int, input().split()))

num.sort()
print(num[0], num[1], num[2])
NM = list(map(int, input().split()))
#NM = [5,2]
#A = [[1,4], [2,5]]
b = list(map(int, input().split()))
#b = [[1,4]]
for i in range(NM[1]-1):
	ab = list(map(int, input().split()))
#	ab = A[i]
	flag = 1
	for i in range(len(b)):
		if (b[i][1] >= ab[0] and b[i][0] <= ab[0] ):
			b[i][0] = ab[0]
			flag = 0
			break
		if(b[i][0] <= ab[1] and b[i][1] >= ab[1]):
			b[i][1] = ab[1] 
			flag = 0
			break
		if (flag):
			b.append(ab)
			flag = 1

#print(b)
print(len(b))

### FIXED CODE ###

N, M = map(int, input().split())
claim = []
for i in range(M):
	claim.append(list(map(int, input().split())))
claim.sort(key=lambda a:a[1])

ans = 0
inter = [-1,-1]
for land in claim:
    if inter[1] <= land[0]:
        inter = land
        ans += 1
print(ans)
def main():
    n,k,c=map(int,input().split())
    s=list(input())
    l=[0]*(k+1)
    r=[0]*(k+1)
    x=0
    i=0
    while i<=n-1:
        if s[i]=='o':
            x+=1
            l[x]=i+1
            i+=c+1
            if x==k:
                break
        else:
            i+=1
    i=n-1
    while 0<=i:
        if s[i]=='o':
            r[x]=i+1
            x-=1
            i-=c+1
            if x==1:
                break
        else:
            i-=1
    for i in range(1,k+1):
        if l[i]==r[i]:
            print(l[i])

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n,k,c=map(int,input().split())
    s=list(input())
    l,r=[0]*(k+1),[0]*(k+1)
    x,i=1,0
    while i<=n-1:
        if s[i]=='o':
            l[x]=i+1
            i+=c+1
            x+=1
            if x==k+1:
                break
        else:
            i+=1
    x,i=k,n-1
    while 0<=i:
        if s[i]=='o':
            r[x]=i+1
            x-=1
            i-=c+1
            if x==0:
                break
        else:
            i-=1
    for i in range(1,k+1):
        if l[i]==r[i]:
            print(l[i])

if __name__ == '__main__':
    main()
a,b =map(int,input().split())
for i in range(b//(10000*a))[::-1]:
  for j in range((b-10000*i)//(5000*(a-i))[::-1]:
    for k in range((b-10000*i-5000*j)//(1000*(a-i-j)))[::-1]:
      if b == i*10000+j*5000+k*1000:
        break
if i==j==k==0:
   print(-1,-1,-1)
else:
   print(i,j,k)
  

### FIXED CODE ###

a, b = map(int, input().split())
o1 = o2 = o3 = -1
for i in range(a+1):
    for j in range(a-i+1):
        k = a-i-j
        if b == i*10000+j*5000+k*1000:
            o1 = i
            o2 = j
            o3 = k
            break
print(o1, o2, o3)
# -*- coding: utf-8 -*-

n = input()
if n[0] == n[1] and n[1] == n[2]:
    print('Yes')
elif n[1] == n[2] and n[3] == n[4]:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

# -*- coding: utf-8 -*-

n = input()
if n[0] == n[1] and n[1] == n[2]:
    print('Yes')
elif n[1] == n[2] and n[2] == n[3]:
    print('Yes')
else:
    print('No')
b = input('')
if b = 'A':
    print('T')
elif b = 'C':
    print('G')
elif b = 'G':
    print('C')
else:
    print('A')


### FIXED CODE ###

b = input('')
if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')
from sys import stdin

N, M, *A = map(int, stdin.read().split())
req = {1: 2,
       2: 5,
       3: 5,
       4: 4,
       5: 5,
       6: 6,
       7: 3,
       8: 7,
       9: 6}

B = sorted([(a, req[a]) for a in A], key=lambda x: x[0], reverse=True)
a_min, n_min = min(B, key=lambda x: x[1])
g = [(a, n-n_min) for a, n in B if a > a_min and n > n_min]
l = [(a, n-n_min) for a, n in B if a < a_min and n > n_min]
l.sort(key=lambda x: x[1], reverse=True)

def dp(rem, C):
    ret = None
    if rem == 0:
        ret = []
    elif rem > 0:
        for a, m in C:
            nxt = dp(rem-m, C)
            if nxt is not None:
                ret = [a] + nxt
                break
    return ret


lst = dp(N % n_min, g + l)
print(''.join(map(str, lst)))

### FIXED CODE ###

from sys import stdin

N, M, *A = map(int, stdin.read().split())
req = {1: 2,
       2: 5,
       3: 5,
       4: 4,
       5: 5,
       6: 6,
       7: 3,
       8: 7,
       9: 6}

B = sorted([(a, req[a]) for a in A], key=lambda x: x[0], reverse=True)
a_min, n_min = min(B, key=lambda x: x[1])
g = [(a, n-n_min) for a, n in B if a > a_min and n > n_min]
l = [(a, n-n_min) for a, n in B if a < a_min and n > n_min]
l.sort(key=lambda x: x[1], reverse=True)
C = g + l

def dp(rem, C):
    ret = None
    if rem == 0:
        ret = []
    elif rem > 0:
        for i in range(len(C)):
            a, m = C[i]
            nxt = dp(rem-m, C[i:])
            if nxt is not None:
                ret = [a] + nxt
                break
    return ret


i = 0
while True:
    quo = N // n_min - i
    rem = N % n_min + i * n_min
    lst = dp(rem, C)
    if lst is not None:
        lst = sorted(lst + [a_min] * (quo-len(lst)), reverse=True)
        print(''.join(map(str, lst)))
        break
    i += 1
import sys
b=int(input())
if b==100000:
  print(3234566667)
  sys.exit()
L=[1,2,3,4,5,6,7,8,9,10,11,12,21,22,23]
for i in range(30,10**5*5):
  a=0
  c=str(i)
  t=list(c)
  for j in range(len(c)-1):
    if abs(int(t[j+1])-int(t[j]))<=1:
      a+=1
  if a==len(c)-1:
    L.append(i)
  if len(L)>=b:
    break
print(L[b-1])

### FIXED CODE ###

def lu(n):
  L.append(n)
  a=n%10
  if len(str(n))>11:
    return 1
  if a==0:
    lu(n*10+1)
    lu(n*10)
  elif a==9:
    lu(n*10+9)
    lu(n*10+8)
  else:
    lu(n*10+1+a)
    lu(n*10+a-1)
    lu(n*10+a)
L=list()
lu(1)
lu(2)
lu(3)
lu(4)
lu(5)
lu(6)
lu(7)
lu(8)
lu(9)
L=sorted(set(L))
k=int(input())
print(L[k-1])
import sys
sys.setrecursionlimit(10000000)

def dfs(x, y, sym):
	tile[x][y] = '.'
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym:
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			if not tile[i][j] == '.':
				if tile[i][j] == '@':
					dfs(i, j, '@')
					res += 1
				elif tile[i][j] == '#':
					dfs(i, j, '#')
					res += 1
				elif tile[i][j] == '*':
					dfs(i, j, '*')
					res += 1
	print(res)

index = 0	
counter=0 
DX = [-1, 0, 1, 0]
DY = [0, -1, 0, 1]

while True:
	counter+=1
	line = input()
	
	if ' ' in line:
		N = int(line.split(' ')[0])
		M = int(line.split(' ')[1])
		tile = [[0 for i in range(N)]for j in range(M)]
	else:
		tile[counter-2] = list(line)

	if N==0 and M==0:
		break

	if counter-1==M:
		solve()
		counter = 0

### FIXED CODE ###

# -*- coding:utf-8 -*-
import sys
def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym):
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			sym = tile[i][j]
			if tile[i][j] != ".":
				if tile[i][j] is sym:
					dfs(i, j, sym)
					res += 1
	print(res)

counter=0
DX = [-1,0,1,0]
DY = [0,-1,0,1]
sys.setrecursionlimit(10**7)
while True:
	line = input()
	if " " in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(M)] for j in range(N)]
	else:
		tile[counter-1] = list(line)
	if N is 0 and M is 0:
		break
	counter += 1
	if counter-1 is N:
		solve()
		counter = 0
def add_edge(frm,to):
    g[frm].append(to)
    rg[to].append(frm)

def dfs(now,used,back_track):
    used[now]=True
    for nx in g[now]:
        if not used[nx]:dfs(nx,used,back_track)
    back_track.append(now)

def rdfs(now,num_cmp,used,cmp):
    used[now]=True
    cmp[now]=num_cmp
    for nx in rg[now]:
        if not used[nx]:rdfs(nx,num_cmp,used,cmp)

def scc(n):
    used=[False]*n
    back_track=[]
    cmp=[-1]*n
    for v in xrange(n):
        if not used[v]:dfs(v,used,back_track)
    used=[False]*n
    num_cmp=0
    for v in back_track[::-1]:
        if not used[v]:
            rdfs(v,num_cmp,used,cmp)
            num_cmp+=1
    return num_cmp,cmp

n,m=map(int,raw_input().split())
g=[[] for _ in xrange(n)]
rg=[[] for _ in xrange(n)]

for i in xrange(m):
    s,t=map(int,raw_input().split())
    add_edge(s,t)
    
num,cmp=scc(n)
q=int(raw_input())
for i in xrange(q):
    u,v=map(int,raw_input().split())
    if cmp[u]==cmp[v]:
        print(1)
    else:
        print(0)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)

def add_edge(frm,to):
    g[frm].append(to)
    rg[to].append(frm)

def dfs(now,used,back_track):
    used[now]=True
    for nx in g[now]:
        if not used[nx]:dfs(nx,used,back_track)
    back_track.append(now)

def rdfs(now,num_cmp,used,cmp):
    used[now]=True
    cmp[now]=num_cmp
    for nx in rg[now]:
        if not used[nx]:rdfs(nx,num_cmp,used,cmp)

def scc(n):
    used=[False]*n
    back_track=[]
    cmp=[-1]*n
    for v in xrange(n):
        if not used[v]:dfs(v,used,back_track)
    used=[False]*n
    num_cmp=0
    for v in back_track[::-1]:
        if not used[v]:
            rdfs(v,num_cmp,used,cmp)
            num_cmp+=1
    return num_cmp,cmp

n,m=map(int,raw_input().split())
g=[[] for _ in xrange(n)]
rg=[[] for _ in xrange(n)]

for i in xrange(m):
    s,t=map(int,raw_input().split())
    add_edge(s,t)

num,cmp=scc(n)
q=int(raw_input())
for i in xrange(q):
    u,v=map(int,raw_input().split())
    if cmp[u]==cmp[v]:
        print(1)
    else:
        print(0)
import bisect
n = int(input())
x = sorted(list(map(int,input().split())), reverse=True)
y = sorted(list(map(int,input().split())), reverse=True)
z = sorted(list(map(int,input().split())), reverse=True)
count = 0
X =[]
for b in range(n):
  k = bisect.bisect_right(x,y[b])
  X[b] =(n-k)
for a in range(n):
  j = bisect.bisect_right(y,z[a])
    count+=sum(X[j:])
print(count)

### FIXED CODE ###

import bisect
n = int(input())
X = sorted(list(map(int,input().split())))
Y = sorted(list(map(int,input().split())))
Z = sorted(list(map(int,input().split())))
print(sum(bisect.bisect_left(X,b) * (n-bisect.bisect_right(Z,b)) for b in Y))
n=int(input())
v=list(map(int,input().split()))
ans1=[0]*(10**5+1)#偶数
ans2=[0]*(10**5+1)#奇数
for i in v[0::2]:
  ans1[i]+=1
for i in v[1::2]:
  ans2[i]+=1
m1=max(ans1)
m2=max(ans2)
flag=False
for i in range(10**5+2):
  if ans1[i]==m1 and ans2[i]==m2:
    falg=True
    ans1.sort()
    ans2.sort()
    m12=ans1[-2]
    m22=ans2[-2]
    break
if len(set(v))==1:
  print(n//2)
elif flag:
  print(n-max(m12+m1,m21+m2))
else:
  print(n-m1-m2)

### FIXED CODE ###

n=int(input())
v=list(map(int,input().split()))
ans1=[0]*(10**5+1)#偶数
ans2=[0]*(10**5+1)#奇数
for i in v[0::2]:
  ans1[i]+=1
for i in v[1::2]:
  ans2[i]+=1
m1=max(ans1)
m2=max(ans2)
flag=False
for i in range(10**5+1):
  if ans1[i]==m1 and ans2[i]==m2:
    flag=True
    ans1.sort()
    ans2.sort()
    m12=ans1[-2]
    m22=ans2[-2]
    break
if len(set(v))==1:
  print(n//2)
elif flag==True:
  print(n-max(m12+m2,m1+m22))
else:
  print(n-m1-m2)
r, D, x = list(map(int, input()))

x_ = [0] * 10

for i in range(10):
    if i == 0:
        x_[i] = r*x - D
    else:
        x_[i] = r*x[i-1] - D
    print(x_[i])



### FIXED CODE ###

r, D, x = list(map(int, input().split()))

x_ = [0] * 10

for i in range(10):
    if i == 0:
        x_[i] = r*x - D
    else:
        x_[i] = r*x_[i-1] - D
    print(x_[i])
a, op, b=input().split()
a=int(a)
b=int(b)
if op=='+':
  print(a+b)
elif op=='-':
  print(a-b)
elif op=='*':
  print(a*b)
elif op=='/':
  print(a//b)
else:
  break


### FIXED CODE ###

while 1:
  a,op,b = input().split()
  a = int(a)
  b = int(b)
  if op == "?":
    break
  else:
    if op == "+":
      x = a + b
      print(x)
    elif op == "-":
      x = a - b
      print(x)
    elif op == "*":
      x = a * b
      print(x)
    elif op == "/":
      x = a // b
      print(x)
    else:
      pass
S = input()
S.replace("hi",":")
if len(set(s)) == 1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
if S.count("hi") == len(S)/2:
    print("Yes")
else:
    print("No")
import sys
from collections import deque, defaultdict
import copy
import bisect
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
import math

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

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

def minus():
	return -1

D = defaultdict(minus)
D2 = defaultdict(minus)
jump = []
first = deque()
for i in range(N):
	if D[A[i]] != -1:
		bisect.insort(jump, (D[A[i]], i))
	D[A[i]] = i
	if D2[A[i]] == -1:
		D2[A[i]] = i
	first.append(D2[A[i]])

x = 0
roop = [0]
syugo = set()
syugo.add(x)
while True:
	while True:
		loc = bisect.bisect_left(jump, (x, x))
		#print(x,loc,jump)
		if loc < len(jump):
			if x == jump[loc][0]:
				x = jump[loc][1] + 1
			else:
				break
		else:
			break
	if x == N:
		x = 0
	else:
		x = first[x % N] + 1
	size1 = len(syugo)
	syugo.add(x)
	size2 = len(syugo)
	if size1 == size2:
		break
	else:
		roop.append(x)
mod = (K - 1) % len(roop)
x = roop[mod] %N
#print(roop, first, x)
output = []
while x < N:
	loc = bisect.bisect_left(jump, (x, x))
	if loc < len(jump):
		if x == jump[loc][0]:
			x = jump[loc][1]
			x = x + 1
		else:
			output.extend(A[x:jump[loc][0]])
			x = jump[loc][0]
			break
	else:
		output.extend(A[x:N])
		break

for i in range(len(output)):
	print(output[i], end='')
	print(" ", end='')
print('\n')




### FIXED CODE ###

import sys
from collections import deque, defaultdict
import copy
import bisect
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
import math

S = int(input())

a = math.ceil(S**0.5)

XY = []
XY.append(a)
XY.append(0)
rest = -S + a**2
if rest > a:
	XY.append(a - 1)
	XY.append(a - 1)
	rest = rest - a
else:
	XY.append(a - 1)
	XY.append(a)

XY.append(0)
XY.append(rest)

for i in range(6):
	print(XY[i], end="")
	print(" ", end="")
print("\n")
n = int(input())
ans = [0 for _ in range(10050)]

for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            
            if v<10050:
            ans[v]+=1

for i in range(n):
    print(ans[i+1])

### FIXED CODE ###

n = int(input())
ans = [0 for a in range(10050)]


for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      v = i*i+j*j+k*k+i*j+j*k+k*i;
      
      if v<10050:
        ans[v]+=1

for i in range(n):
  print(ans[i+1])
A=[]
for i in range(3):
    A.append(list(map(int,input().split())))
N=int(input())
for i in range(N):
    b=int(input())
    for j in range(3):
        for k in range(3):
            if A[j][k]==b:
                A[j][k]=0
 
flag=False
for i in range(3):
    if A[i][:]==[0,0,0]:
        flag=True
    elif A[0][i]==0 and A[1][i]==0 and A[2][i]==0:
        flag=True
    elif A[1][1]==0 and A[0][2]==0 and A[2][0]==0:
        flag=True
    else A[0][0]==0 and A[1][1]==0 and A[2][2]==0:
        flag=True
if flag:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

A=[[int(x) for x in input().split()]for i in range(3)]
N = int(input())
b = []
for i in range(N):
    b.append(int(input()))
 
for i in range(3):
    if A[i][0] in b and A[i][1] in b and A[i][2] in b:
        print('Yes')
        exit()
for i in range(3):
    if A[0][i] in b and A[1][i] in b and A[2][i] in b:
        print('Yes')
        exit()
if A[0][0] in b and A[1][1] in b and A[2][2] in b:
    print('Yes')
    exit()
if A[2][0] in b and A[1][1] in b and A[0][2] in b:
    print('Yes')
    exit() 
print('No')
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 18:54:16 2020

@author: Kanaru Sato
"""

n = int(input())
Dict = {}
ans = 0

for i in range(n):
    s = list(input())
    s.sort()
    if s in Dict:
        ans += Dict[s]
        Dict[s] += 1
    else:
        Dict[s] = 1

print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 18:54:16 2020

@author: Kanaru Sato
"""

n = int(input())
Dict = {}
ans = 0

for i in range(n):
    s = list(input())
    s.sort()
    s = "".join(s)
    if s in Dict:
        ans += Dict[s]
        Dict[s] += 1
    else:
        Dict[s] = 1

print(ans)
n, k = map(int, input().split())
H = list(map(int, input().split()))
dp = [float("inf") for _ in range(n)]  # 最小化問題なのでinfで初期化
dp[0] = 0  # 初期条件

dp[1] = dp[0] + abs(H[1] - H[0])  # 初期条件2

for i in range(n - 1):  # 配るDP
    for j range(1, min(k+1, n-i))
        dp[i + j] = min(dp[i + j], dp[i] + abs(H[i + j] - H[i]))
print(dp[n - 1])


### FIXED CODE ###

N, K = map(int, input().split())
*h, = map(int, input().split())
dp = [float("inf") for _ in range(N)]
dp[0] = 0
for i in range(N - 1):
	for j in range(1, min(K + 1, N - i)):
		dp[i + j] = min(dp[i + j], dp[i] + abs(h[i + j] - h[i]))
print(dp[N - 1])
second=input()
first=strings.spitlines(second)
P=first[0]
S=first[1]
count=0
for t in range(len(P)-1):
  if P=0:count=count+1
    else count=count
print(count)

### FIXED CODE ###

a=[input() for i in range(2)]
P=a[0]
S=a[1]
count=0
for t in range(len(P)):
  if P[t] != S[t]:
    count=count+1
print(count)
def resolve():
    N = int(input())
    list = list(map(int, input().split()))
    print(np.prod(list) if np.prod(list)<=10**18 else "-1")
resolve()

### FIXED CODE ###

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 1
    if 0 in A:
        print(0)
        exit()
    for i in A:
        ans *= i
        if ans > 10**18:
            print(-1)
            exit()
    print(ans)
resolve()
N, K = map(int, input().split())
A = list(map(int, input().split()))

visited = [0 for _ in range(N)]
first_visit = [0 for _ in range(N)]

now = 0
flag = True
for i in range(10 ** 5 * 3):
    if first_visit[now] == 0:
        first_visit[now] = i

    visited[A[now] - 1] += 1
    now = A[now] - 1

    if i == K - 1:
        print(now + 1)
        flag = False
        break

if flag:
    num = 0
    for i in range(N):
        if visited[i] > 3:
            num += 1

    for i in range(N):
        if K % num == first_visit[i] % num:
            print(i + 1)


### FIXED CODE ###

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

visited = [0 for _ in range(N)]
first_visit = [0 for _ in range(N)]

now = 0
flag = True
for i in range(10 ** 5 * 5):
    if first_visit[now] == 0:
        first_visit[now] = i

    visited[A[now] - 1] += 1
    now = A[now] - 1

    if i == K - 1:
        print(now + 1)
        flag = False
        break

if flag:
    num = 0
    for i in range(N):
        if visited[i] > 2:
            num += 1

    for i in range(N):
        if visited[i] >= 2:
            if K % num == first_visit[i] % num:
                print(i + 1)
                break
S = list(input())
a = S[0] + S[1]
b = S[2] + S[3]
A = int(a)
B = int(b)

if (0 < A < 13 and 0 < B < 13):
  print("AMBIGUOUS")
elif (0 < A < 13 and (12 < B < 100 or B == 0)):
  print("MMYY")
elif (0 < B < 13 and (12 < A < 100 or A == 0)):
  print("YYMM")
else:
  print("NA")

### FIXED CODE ###

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

           
if(S[K-1] == "A"):
  S[K-1] = "a"
elif(S[K-1] == "B"):
  S[K-1] = "b"
elif(S[K-1] == "C"):
  S[K-1] = "c"
           
"".join(S)

S_1 = S[0]
for i in range(1,N):
  S_1 = S_1 + S[i]
print(S_1)
import copy
N = int(input())
Listx = list(map(int,input().split()))
Listxs = sorted(Listx)
A = Listxs[N//2]
B = Listxs[N//2-1]

for i in range(N):
    print(A if  B>= Listx[i] and else B)


### FIXED CODE ###

import copy
N = int(input())
Listx = list(map(int,input().split()))
Listxs = sorted(Listx)
A = Listxs[N//2]
B = Listxs[N//2-1]

for i in range(N):
    print(A if  B>= Listx[i] else B)
N = int(input())
p = list(map(int,input().split()))

o=1
e=0
for i in range(N):
  if i != o:
    o +=1
    e  +=1

if e=0 or e=2:
  print(YES)
else:
  print(NO)


### FIXED CODE ###

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

o=1
e=0
for i in p:
  if i != o:
    e +=1
  o +=1
if e==0 or e==2:
  print("YES")
else:
  print("NO")
N = int(input())
v = list(map(int, input().split()))
i = 0

v.sort

for i in range(N - 1):
    v[i + 1] = (v[i] + v[i + 1]) / 2
    
print(v[-1])


### FIXED CODE ###

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

if a >= 3200:
    print(s)
    
else:
    print("red")
D,N = map(int, input().split())

if D == 0:
    if N! = 100:
        print(N)
    else:
        print(101)

elif D == 1:
    if N != 100:
        print(100*N)
    else:
        print(100*101)

elif D == 2:
    if N != 100:
        print(100*100*N)
    else:
        print(100*100*101)


### FIXED CODE ###

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

if D == 0:
    if N != 100:
        print(N)
    else:
        print(101)

elif D == 1:
    if N != 100:
        print(100*N)
    else:
        print(100*101)

elif D == 2:
    if N != 100:
        print(100*100*N)
    else:
        print(100*100*101)
a, b = input(,)
print(a*b,2*(a+b))

### FIXED CODE ###

nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)
# -*- coding: utf-8 -*-
a,b = map(str,input().split())#文字の入力
import math
S = math.sqrt(int("a"+"b")
if S == int(S):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

# -*- coding: utf-8 -*-
a,b = map(str,input().split())#文字の入力
import math
S = math.sqrt(int(a+b))
if S == int(S):
  print("Yes")
else:
  print("No")
N=int(input())
A=list(map(int, input().split()))
for i in [1:N+1]:
  print(len([1 for x in A if x==i]))

### FIXED CODE ###

import numpy as np
N=int(input())
A_np = np.zeros(N)
A=list(map(int, input().split()))
for Ai in A:
  A_np[Ai-1] = A_np[Ai-1] + 1
for i in range(N):
  print('{:.0f}'.format(A_np[i]))
import sys
sys.setrecursionlimit(10000)
def bfs(ind):
    kouho=friends[ind]
    for i in kouho:
        if sans[i]!=-1:
            continue
        sans[i]=sans[ind]
        l[sans[ind]].add(i)
        bfs(i)
n,m,k=list(map(int,input().split()))
f=[list(map(int,input().split())) for _ in range(m)]
friends=[set() for _ in range(n)]
friends_num=list(map(lambda x:len(x),friends))
bl=[list(map(int,input().split())) for _ in range(k)]
l=[{i} for i in range(n)]

for each in f:
    a,b=each
    friends[a-1].add(b-1)
    friends[b-1].add(a-1)

block=[set() for _ in range(n)]
for each in bl:
    a,b=each
    block[a-1].add(b-1)
    block[b-1].add(a-1)

sans=[-1 for _ in range(n)]
sans[0]=0
bfs(0)
for i in range(n):
    if sans[i]!=-1:
        continue
    sans[i]=i
    bfs(i)
ans=[0 for _ in range(n)]
#"""
for i in range(n):
    tmp=(l[sans[i]]-block[i])-friends[i]-{i}
    ans[i]=len(tmp)

#"""
ans=" ".join(map(str,ans))
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
total=0
def bfs(ind,num):
    kouho=friends[ind]
    
    for i in kouho:
        if sans[i]!=-1:
            continue
        num+=1
        sans[i]=sans[ind]
        l[sans[ind]].add(i)
        num+=bfs(i,0)
    return num
n,m,k=list(map(int,input().split()))
f=[list(map(int,input().split())) for _ in range(m)]
friends=[set() for _ in range(n)]
friends_num=list(map(lambda x:len(x),friends))
bl=[list(map(int,input().split())) for _ in range(k)]
l=[{i} for i in range(n)]

for each in f:
    a,b=each
    friends[a-1].add(b-1)
    friends[b-1].add(a-1)

block=[set() for _ in range(n)]
for each in bl:
    a,b=each
    block[a-1].add(b-1)
    block[b-1].add(a-1)

sans=[-1 for _ in range(n)]
sans[0]=0
total=bfs(0,total)
for i in range(n):
    if sans[i]!=-1:
        continue
    sans[i]=i
    total=bfs(i,total)
ans=[0 for _ in range(n)]


for i in range(n):
    l[i]=set(l[i])


for i in range(n):
    tmp=l[sans[i]]
    ans[i]+=len(tmp)-len(friends[i])-1
    for j in block[i]:
        if sans[i]==sans[j]:
            ans[j]-=1

ans=" ".join(map(str,ans))
#print("total:",total)
print(ans)