Harryxun/stf_run huggingface dataset:
S = input()
N = len(S)
ans=[0]*N
S += "#"
#分割統治法
def RL(k):
    i=0
    count_R=0
    while S[k+i]=="R" and S[k+i]!="#":
        count_R +=1
        i += 1
        
    j=0
    count_L=0
    while S[k+i+j]=="L" and S[k+i+j]!="#":
        count_L += 1
        j+= 1
        
    
    ans[k+i-1] += (count_R+1)//2+count_L//2
    ans[k+i] += (count_R)//2+(count_L+1)//2

    if S[i+k+j]!="#":
        RL(k+i+j)

RL(0)
[print(x) for x in ans]

### FIXED CODE ###

S = input()
N = len(S)
ans=[0]*N


count=0
for i in range(N):
    if S[i]=="R":
        count+=1
    else:
        ans[i-1] += (count+1)//2
        ans[i] += count//2
        count=0

count=0
for i in range(1,N+1):
    if S[N-i]=="L":
        count+=1
    else:
        ans[N-i] += count//2
        ans[N-i+1] += (count+1)//2
        count=0

[print(x) for x in ans]
h, w, m = map(int, input().split())
lsh = [0] * h
lsw = [0] * w

bom = []
for _ in range(m):
    m1, m2 = map(int, input().split())
    lsh[m1 - 1] += 1
    lsw[m2 - 1] += 1
    bom.append((m1, m2))

lshmax = max(lsh)
lswmax = max(lsw)

for i in range(h)
    if lsh[i] == lshmax:
        for j in range(w):
            if lsw[j] == lswmax:
                if (i,j) in bom:
                    print(lshmax+lswmax-1)
                else:
                    print(lshmax+lswmax)

### FIXED CODE ###

def main():
    h, w, m = map(int, input().split())
    lsh = [0] * h
    lsw = [0] * w

    bom = set()
    for _ in range(m):
        m1, m2 = map(int, input().split())
        lsh[m1 - 1] += 1
        lsw[m2 - 1] += 1
        bom.add((m1-1, m2-1))

    lshmax = max(lsh)
    lswmax = max(lsw)

    hin = [i for i in range(h) if lsh[i] == lshmax]
    win = [i for i in range(w) if lsw[i] == lswmax]

    for i in hin:
        for j in win:
            if (i, j) not in bom:
                print(lshmax + lswmax)
                exit(0)
    else:
        print(lshmax + lswmax -1)


if __name__ == '__main__':
    main()
c=a*b
if c%2 ==0:
    print(Even)
else:
    print(Odd)

### FIXED CODE ###

a, b= (int(i) for i in input().split())  
c = a*b
if c%2 == 0:
    print("Even")
else:
    print("Odd")
import collections

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

eNum=collections.Counter(r[1::2])
oNum=collections.Counter(r[::2])


if list(eNum)[0]==list(oNum)[0]:
  print(len(r)-max(eNum[list(eNum)[0]]+oNum[list(oNum)[1]],eNum[list(eNum)[1]]+oNum[list(oNum)[0]]))
else:
  print(len(r)-eNum[list(eNum)[0]]-oNum[list(oNum)[0]])


### FIXED CODE ###

import collections

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

eNum=collections.Counter(r[1::2]).most_common()
oNum=collections.Counter(r[::2]).most_common()
eNum.append((0,0))
oNum.append((0,0))



if eNum[0][0]==oNum[0][0]:
  print(len(r)-max(eNum[0][1]+oNum[1][1],eNum[1][1]+oNum[0][1]))
else:
  print(len(r)-eNum[0][1]-oNum[0][1])
x,y = map(int,input().split())

import sys
sys.setrecursionlimit(200000000)
p = 10**9+7

def exp(y,x):
  xbin=str(bin(x))[2:]
  ans=1
  yl=[0]*(len(xbin)+1)
  yl[0]=y
  yl[1]=y**2
  for d,i in enumerate(xbin[::-1],start=0):
    if d > 1:
      yl[d]=yl[d-1]**2%p
    if i == "1":
      ans=(ans*yl[d])%p
  return ans%p

def ff(n,ca):
  if ca == 1:
    return n
  return n*ff(n-1,ca-1)%p

if (y+x)%3 != 0:
  print(0)
elif y/x > 2:
  print(0)
elif y/x < 0.5:
  print(0)
else:
  n=(2*x-y)//3
  m=(2*y-x)//3
  fact=1
  for i in range(2,n+1):
    fact=fact*i%p
  ans=ff(n+m,n)*exp(fact,p-2)%p
  print(ans)

### FIXED CODE ###

x,y = map(int, input().split())

import sys
sys.setrecursionlimit(200000000)
p = 10**9+7

def exp(y,x):
  xbin=str(bin(x))[2:]
  ans=1
  yl=[0]*(len(xbin)+1)
  yl[0]=y
  yl[1]=y**2
  for d,i in enumerate(xbin[::-1],start=0):
    if d > 1:
      yl[d]=yl[d-1]**2%p
    if i == "1":
      ans=(ans*yl[d])%p
  return ans%p

def ff(n,ca):
  if ca == 0:
    return 1
  if ca == 1:
    return n
  return n*ff(n-1,ca-1)%p

if (y+x)%3 != 0:
  print(0)
elif y/x > 2:
  print(0)
elif y/x < 0.5:
  print(0)
else:
  n=(2*x-y)//3
  m=(2*y-x)//3
  fact=1
  for i in range(2,n+1):
    fact=fact*i%p
  ans=ff(n+m,n)*exp(fact,p-2)%p
  print(ans)
A, B= [int(input() )for _ in range(2)]
S = str(input())

try:
    if (type(int(S[:A]))== int) & (S[A]=="-") & (type(int(S[A+1:]))==int):
        print('Yes')
    else:
        print('No')
except:
    print("No")

### FIXED CODE ###

g = list(map(int,input().split()))
S = str(input())
 
if ((S[:g[0]]+S[g[0]+1:]).isdigit()) &  (S[g[0]]=="-"):
    print("Yes")
else:
    print("No")
a, op, b = input().split()
if op = '+':
  print(int(a)+int(b))
else:
  print(int(a)-int(b))

### FIXED CODE ###

a, op, b = input().split()
if op == '+':
  print(int(a)+int(b))
else:
  print(int(a)-int(b))
r = input()

r^2

### FIXED CODE ###


r = int(input())

r2 = int(r**2)

print(r2)
import sys
from operator import mul
from functools import reduce

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

MARCH = 'MARCH'
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

N = INT()
S = [input().rstrip() for _ in range(N)]

S = [s for s in S if s[0] in MARCH]

A = [0]*N
for s in S:
	A[MARCH.index(s[0])] += 1

#print(A)

if sum(A) <= 3:
	print(0)
	sys.exit()

ans = cmb(sum(A), 3)
#print(ans)

for a in A:
	if a<=1:continue
	if a>=3:
		ans -= cmb(a, 3)
	ans -= cmb(a, 2) * (sum(A)-a)

print(ans)

### FIXED CODE ###

import sys
from operator import mul
from functools import reduce

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

MARCH = 'MARCH'
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

N = INT()
S = [input().rstrip() for _ in range(N)]

S = [s for s in S if s[0] in MARCH]

A = [0]*5
for s in S:
	A[MARCH.index(s[0])] += 1

#print(A)

if sum(A) < 3:
	print(0)
	sys.exit()

ans = cmb(sum(A), 3)
#print(ans)

for a in A:
	if a<=1:continue
	if a>=3:
		ans -= cmb(a, 3)
	ans -= cmb(a, 2) * (sum(A)-a)

print(ans)
from itertools import combinations
N,A,B = [int(i) for i in input().split()]

v = [int(i) for i in input().split()]
v.sort()

if v[-A] != v[-A-1]:
    print(sum(v[-A:]) / A)
    print(1)
elif v[-1] :
    # AAと同じ数のカウント
    # Aよりも大きい数のカウント
    cnt = 0
    bigger = 0
    for i in range(N):
        if v[A] < v[i]:
            bigger += 1
        if v[i] == v[A]:
            cnt += 1

    ans = 0
    mini = min(B, cnt+bigger)
    for i in range(A,mini):
        ans += len(list(combinations(range(cnt), i - bigger)))

    print(sum(v[-A:]) / A)
    print(ans)

### FIXED CODE ###

N,A,B = [int(i) for i in input().split()]

v = [int(i) for i in input().split()]
v.sort(reverse=True)

max_average = sum(v[:A]) / A

C = [[0]*51 for i in range(51)]
for i in range(N+1):
    for j in range(i+1):
        if j == 0 or i == 0:
            C[i][j] = 1
        else:
            C[i][j] = C[i-1][j-1] + C[i-1][j]

ans = 0
cnt = 0
if v[0] == v[A-1]:
    for i in range(N):
        if v[i] == v[0]:
            cnt += 1
    for i in range(A, B+1):
        ans += C[cnt][i]
else:
    included = 0
    for i in range(N):
        if v[i] == v[A-1]:
            cnt += 1
            if i < A:
                included += 1
    ans += C[cnt][included]

print(max_average)
print(ans)
n,d=map(int,input().split())
a=(2*d)+1
if n%a==0:
  print(int(n/a))
else:
  print(int(n//a)+1)

### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
cnt=0
for i in range(0,n):
  if p[i]==i+1:
    cnt+=0
  else:
    cnt+=1
    
if cnt<=2:
  print("YES")
else:
  print("NO")
import sys
inputs = sys.stdin.readline
def main():
	ans = 1
	a = 0
	b = 0
	N, M = map(int,inputs().split())
	for i in range(M):
		a = int(inputs())
		ans = ans*count(a - b -1)
		b = a+1
	if a == N - 1:
		print(ans%1000000007)
	else:
		print(ans*count(N - a-1)%1000000007)


def count(x):
	if x < 0:
		return 0
	elif x == 0:
		return 1
	elif x == 1:
		return 1
	elif x == 2:
		return 2
	else:
		return(count(x-1)+count(x-2))

main()

### FIXED CODE ###

import sys
inputs = sys.stdin.readline
def main():
	ans = 1
	a = 0
	b = 0
	flg2 = 0
	N, M = map(int,inputs().split())
	A =[0]*(M+1)
	for i in range(M):
		a = int(inputs())
		A[i] = a-1-b
		b = a + 1
	A[M] = N - b
	A.sort()
	if A [0] < 0:
		flg2 = 1
	p = 1
	q = 1
	t = 0
	flg = 0
	while (A[t]<2):
		t = t+1
		if t > M:
			flg = 1
			break
	for k in range(2,N+1):
		r = p + q
		p = q
		q = r
		if flg == 1:
			break
		while (A[t] == k):
			ans = ans*r%1000000007
			t += 1
			if t == M+1:
				flg = 1
				break
		if flg == 1:
			break
	if flg2 == 0:
		print(ans%1000000007)
	else:
		print(0)
main()
#!/usr/bin/env python3

import sys
import math
import itertools

def main():
    n, m = map(int, sys.stdin.readline().split())
    ss, cs = map(list, zip(*(map(int, sys.stdin.readline().split()) for _ in range(m))))

    ans = [None for _ in range(n)]

    for i in range(m):
        if ans[ss[i] - 1] is not None and ans[ss[i] - 1] != cs[i]:
            print(-1)
            return
        ans[ss[i] - 1] = cs[i]

    for k in range(n):
        if ans[k] == 0 and n > 1:
            print(-1)
            return
        elif ans[k] is not None:
            break

    for k in range(n):
        if ans[k] is None:
            if k == 0 and n > 1:
                ans[k] = 1
            else:
                ans[k] = 0

    print(''.join(map(str, ans)))


if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3

import sys
import math
import itertools

def main():
    n, m = map(int, sys.stdin.readline().split())
    if m == 0:
        ss = []
        cs = []
    else:
        ss, cs = map(list, zip(*(map(int, sys.stdin.readline().split()) for _ in range(m))))

    ans = [None for _ in range(n)]

    for i in range(m):
        if ans[ss[i] - 1] is None:
            ans[ss[i] - 1] = cs[i]
        elif ans[ss[i] - 1] != cs[i]:
            return "-1"

    if n == 1:
        if ans[0] is None:
            return "0"
        else:
            return str(ans[0])

    if ans[0] == 0:
        return "-1"

    for k in range(n):
        if ans[k] is None:
            if k == 0:
                ans[k] = 1
            else:
                ans[k] = 0

    return ''.join(map(str, ans))

if __name__ == '__main__':
    print(main())
INF=int(1e6)

N=int(input())
heights=[int(x) for x in input().split()]
dp=[INF]*N
if(N==1):
  print(dp[0])
  exit()

dp[1]=heights[1]-heights[0]

for i in range(2,N):
	dp[i]=min(dp[i-1],dp[i-2])

    
print(dp[N])


### FIXED CODE ###

INF=int(1e6)

N=int(input())
heights=[int(x) for x in input().split()]
# print('heights: ',heights)
dp=[INF]*N
# print(dp)
if(N==1):
  print(dp[0])
  exit()

dp[0]=0
dp[1]=abs(heights[1]-heights[0])

for i in range(2,N):
	dp[i]= min(abs(heights[i]- heights[i-1])+ dp[i-1],abs(heights[i]- heights[i-2])+ dp[i-2])


# print('dp: ',dp)
print(dp[N-1])

#30->60->60->50
#30   30  30  40
gjgsidogse

### FIXED CODE ###

S = input()
T = input()
print('Yes') if S + T[-1] == T else print('No')
def visit(u):
    global color, d, f, t
    color[u] = GRAY
    d[u] += t
    t += 1
    for v in range(n):
        if (M[u][v] == 0):
            continue
        else:
            if (color[v] == WHITE):
                visit(v)
    color[u] = BLACK
    f[u] = t
    t += 1

n = int(input())
M = [[0 for i in range(n)] for i in range(n)]
for i in range(n):
    tmp = list(map(int, input().split()))
    for j in range(tmp[1]):
        M[tmp[0]-1][tmp[j+2]-1] = 1

for u in range(n):
    if (color[u] == WHITE):
        visit(u)
for u in range(n):
    print(str(u+1), str(d[u]), str(f[u]), sep = " ")

### FIXED CODE ###

def dfs(u):
    global dfs_color, d, f, t
    color[u] = GRAY
    d[u] += t
    t += 1
    for v in range(n):
        if (M[u][v] == 0):
            continue
        else:
            if (color[v] == WHITE):
               dfs(v)
    color[u] = BLACK
    f[u] = t
    t += 1

n = int(input())
M = [[False for i in range(n)] for j in range(n)]
for i in range(n):
    tmp = list(map(int, input().split()))
    for j in range(tmp[1]):
        M[tmp[0]-1][tmp[j+2]-1] = True

WHITE = 0
GRAY = 1
BLACK = 2
color = [WHITE for i in range(n)]
d = [0 for i in range(n)]
f = [0 for i in range(n)]
t = 1

for u in range(n):
    if (color[u] == WHITE):
        dfs(u)
for u in range(n):
    print(str(u+1), str(d[u]), str(f[u]), sep = " ")
N = int(input())
R = [0 for i in range(2)]
st = input().split()
for i in range(N):
    k = int(st[i])
    m = 0
    if k % 4 == 1 or k % 4 == 3:
        m = 0
    elif k % 4 == 2:
        m = 1
    else:
        m = 2
    R[m] += 1
    

if R[1]+R[2]*2 < 2*(N-1):
    print("No")
else:
    print("Yes")


### FIXED CODE ###

N = int(input())
a = [int(i) for i in input().split()]
P=0
Q=0
R=0
for i in range(N):
    if a[i]%4==0:
        P+=1
    elif a[i]%4==2:
        Q+=1
    else:
        R+=1
if (Q==0 and R>P+1) or (Q!=0 and R>P):
    print("No")
else:
    print("Yes")
n = int(input(), 2)
count  = 0
while n > 0:
    n = n && (n - 1)
    count += 1
print(count)

### FIXED CODE ###

n = int(input(), 2)
count  = 0
while n > 0:
    n = n & (n - 1)
    count += 1
print(count)
N = int(input())
a = [[0 for j in range(19)] for i in range(19)]
for i in range(N):
    A=input()
    # tmp = int(float(A) * 10**9)
    tmp = int(A.replace('.', ''))
    count2 = 0
    count5 = 0
    for _ in range(18):
        if tmp % 2 == 0:
            count2 += 1
            tmp /= 2
        else:
            break
    for _ in range(18):
        if tmp % 5 == 0:
            count5 += 1
            tmp /= 5
        else:
            break
    if A.find('.') > 0:
        count2 = count2 + 10 - len(A) + A.find('.')
        count5 = count5 + 10 - len(A) + A.find('.')
    else:
        count2 += 9
        count5 += 9
    a[count2][count5] += 1
ans=0
for i in range(19):
    for i2 in range(19):
        for j in range(19):
            for j2 in range(19):
                if i + i2 >= 18 and j + j2 >= 18 and ( i < i2 or i == i2 and j <= j2) and a[i][j] >0 and a[i2][j2] > 0:
                    if i == i2 and j == j2:
                        ans += a[i][j] * (a[i][j]-1) // 2
                    else:
                        ans += a[i][j] * a[i2][j2]
print(ans)


### FIXED CODE ###

N = int(input())
a = [[0 for j in range(19)] for i in range(19)]
ans=0
for _ in range(N):
    A=input()
    if A.find('.') > 0:
        count2 = 10 - len(A) + A.find('.')
        count5 = 10 - len(A) + A.find('.')
    else:
        count2 = 9
        count5 = 9
    tmp = int(A.replace('.', ''))
    while count2 < 18:
        if tmp % 2 == 0:
            count2 += 1
            tmp //= 2
        else:
            break
    while count5 < 18:
        if tmp % 5 == 0:
            count5 += 1
            tmp //= 5
        else:
            break
    for i in range(18-count2,19):
        for j in range(18-count5,19):
            ans += a[i][j]
    a[count2][count5] += 1
print(ans)
while True:
    C -= B
    A -= D
    if A<=0:
        print('No')
        break
    elif C<=0:
        print('Yes')
        break

### FIXED CODE ###


A,B,C,D=map(int,input().split())
while True:
    C -= B
    if C<=0:
        print('Yes')
        break
    A -= D
    if A<=0:
        print('No')
        break
-*- coding: utf-8 -*-
import math
import sys

X = int(input())

for A in range(-118, 190):
  for B in range(-119, 119):
    val = math.pow(A, 5) - math.pow(B, 5)
    if(val == X):
      print(A, B)
      sys.exit()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import math
import sys

X = int(input())

for A in range(-118, 120):
  for B in range(-119, 119):
    val = math.pow(A, 5) - math.pow(B, 5)
    if(val == X):
      print(A, B)
      sys.exit()
if N == M:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N, M = input().split()

if N == M:
  print('Yes')
else:
  print('No')
list=[int(input()) for i in range(3)]
print(len(set(list)))

### FIXED CODE ###

s=list(set(input().split()))
if len(s)==2:
  print("Yes")
else:
  print("No")
p = int(input().split()[1])
a = list(map(int, input())
if 10 % p == 0:
  r = sum(i for i, x in enumerate(a, 1) if x % p == 0)
else:
  d = [1] + [0] * (p - 1)
  t, y = 0, 1
  for i, x in enumerate(reversed(a), 1):
    t = (t + x * y) % p
    d[t] += 1
    y = y * 10 % p;
  r = sum(i * (i - 1) // 2 for i in d)
print(r)


### FIXED CODE ###

from itertools import accumulate
from collections import Counter

p = int(input().split()[1])
a = list(map(int, input()))
if 10 % p == 0:
  r = sum(i for i, x in enumerate(a, 1) if x % p == 0)
else:
  a = accumulate(x * pow(10, i, p) for i, x in enumerate(reversed(a), 1))
  c = Counter(x % p for x in a) 
  c[0] += 1
  r = sum(i * (i - 1) // 2 for i in c.values())
print(r)
スコード 拡げる

Copy
Copy
n = int(input())
txy = [list(map(int, input().split())) for _ in range(n)]
T=X=Y=0
ans = "Yes"
 
for t,x,y in txy:
  a = (t-T) - (abs(X-x) + abs(Y-y))
  if a % 2 == 0 and abs(X-x) + abs(Y-y) <= t - T:
    T,X,Y = t,x,y
  else:
    ans = "No"
    break
print(ans)

### FIXED CODE ###

N=int(input())
x=y=t=0
flag=True
for i in range(N):
  ti, xi, yi = map(int, input().split())
  dist = abs(xi-x)+abs(yi-y)
  dt = ti-t
  x, y, t = xi, yi, ti
  if dist<=dt and dist%2==dt%2:
    continue
  else:
    flag=False
print("Yes") if flag else print("No")
n,m,x=map(int,input().split())
a=[int(input()) for i in range(m)]
cnt=0
for i in range(m):
  if x<a[i]:
    cnt+=1
print(cnt)


### FIXED CODE ###

N, M, X = map(int, input().split())
*A, = map(int, input().split())

print(min(len([x for x in A if x < X]), len([x for x in A if x > X])))
import itertools
N, M = [int(_) for _ in input().split()]
S = [int(_) for _ in input().split()]
T = [int(_) for _ in input().split()]
mod = 10**9 + 7
dp = [[1] * (M + 1)] + [[1] + [0] * M for _ in range(N)]
for n, m in itertools.product(range(N), range(M)):
    dp[n + 1][m + 1] = dp[n][m + 1] + dp[n + 1][m] - dp[n][m]
    if S[n] == T[m]:
        dp[n + 1][m + 1] += dp[n][m]
    dp[n + 1][m + 1] %= mod
print(dp[-1][-1])


### FIXED CODE ###

X, A = [int(_) for _ in input().split()]
if X < A:
    print(0)
else:
    print(10)
S = input()
if S[-1] == "s":
	print( S, "es" )
else print( S, "s" )

### FIXED CODE ###

S = input()
if S[-1] == "s":
  print( S + "es" )
else: 
  print( S + "s" )
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a = x & y
  an=len(a)
  if an>c:
    c=an
print(c)


### FIXED CODE ###

n=int(input())
s=input()
c=0
for i in range(1,n):
  x=set(s[:i])
  y=set(s[i:])
  a = len(x & y)
  if a > c:
    c = a
print(c)
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N, A, B = map(int, input().split())
A = list(map(int, input().split()))
D = [int(input()) for _ in range(N)]
"""

import numpy as np

N = int(input())
arr = np.arange(1, N + 1)
t_arr = np.append(arr[1:], arr[0])
print(sum(arr % t_arr))


# def main():


# if __name__ == '__main__':
#     main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1


# def gen_counter(stop=10):
#     index = 1
#     while True:
#         if stop < index:
#             break
#         yield index
#         index += 1


N = int(input())
res = (N - 1) * N // 2
print(res)


# arr = np.arange(1, N + 1)
# t_arr = np.append(arr[1:], arr[0])
# print(sum(arr % t_arr))
yandy
S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    c = S.index('C')
    if S[1:c].islower() and S[c+1:].islower():
        print('AC')
        exit()


print('WA')


### FIXED CODE ###

s = input()

if s[0]=="A" and s[2:-1].count("C")==1 and s[1:].replace("C","a",1).islower()==True:
  print('AC')
else:
  print('WA')
from math import * 
def lcm(a,b):
    return (a*b)//gcd(a,b)

ans=1
for _ in range(int(input())):
    ans=lcm(ans,int(input()))
print(ans)

### FIXED CODE ###

#from math import * 
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b):
    return (a*b)//gcd(a,b)

ans=1
for _ in range(int(input())):
    ans=lcm(ans,int(input()))
print(ans)
from collections import deque

s = deque(input())
q = int(input())
rev = False
for i in range(q):
    que = input()
    if que[0] == '1':
        rev = not rev
    else:
        que = list(que.split())
        if (int(que[1])==1 and not rev) or (int(que[1])==2 and rev):
            s.appendleft(que[2])
        else:
            s.append(que[2])

if rev: ans = ''.join(s[::-1])
else: ans = ''.join(s)
print(ans)


### FIXED CODE ###

# import bisect
# import heapq
# from copy import deepcopy
from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math

# n, k = map(int, input().split())
# a = list(map(int, input().split()))
s = deque(input())
q = int(input())
rev = False
for i in range(q):
    que = input()
    if que[0] == '1':
        rev = not rev
    else:
        que = list(que.split())
        if (int(que[1])==1 and not rev) or (int(que[1])==2 and rev):
            s.appendleft(que[2])
        else:
            s.append(que[2])

if rev: ans = ''.join(reversed(s))
else: ans = ''.join(s)
print(ans)
a,b,c = input(),input(),input()
print(a[0]+b[0]+c[0])

### FIXED CODE ###

a,b,c = input().split()
print(a[0]+b[0]+c[0])
import math
a, b, x = map(int, input().split())
if x > a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
elif x < a**2*b/2:
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))
else:
  print(0)

### FIXED CODE ###

import math
a, b, x = map(int, input().split())

if x == a**2*b:
  print(0)
  
elif x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))
n = int(input())
a = int(input())

print(abs(n**2-a)


### FIXED CODE ###

n = int(input())
a = int(input())

print(abs(n**2-a))
a,b = map(int,input().split())
c = list(map(int,input().split()))
c.reversed()
su = 0
for i in range(b):
    if a >= c[i]:
        a %= c[i]
        su += 1
        
print(su)


### FIXED CODE ###

a,b = map(int,input().split())
c = list(map(int,input().split()))
dp = [float("inf") for i in range(a+2)]
dp[0]=0
for i in range(a+1):
    for j in c:
        if i + j <= a:
            dp[i+j] = min(dp[i+j],dp[i] + 1)
            
print(dp[a])
from scipy.sparse import*
(n,m,s,*D),*t=[map(int,t.split())for t in open(0)]
R,C=[],[]
r=range(2501)
for u,v,a,b in t[:m]:
 for i in r:k=(i+a)*51;R+=k+u,k+v;C+=i*51+v,i*51+u;D+=b,b
for i,(c,d)in enumerate(t[m:],1):
 for j in r:R+=j*51+i,;C+=(j+c)*51+i,;D+=d,
d=csgraph.dijkstra(csr_matrix((D,(R,C))),1,min(2500,s)*51+1)
for i in range(2,n+1):print(int(min(d[i::51])))

### FIXED CODE ###

from scipy.sparse import*
n,m,s,*t=map(int,open(0).read().split())
row,col,dat=[],[],[]
for u,v,a,b in zip(*[iter(t[:m*4])]*4):
    for i in range(2501-a):
        row+=(i+a)*51+u,(i+a)*51+v
        col+=i*51+v,i*51+u
        dat+=b,b
for i,(c,d)in enumerate(zip(*[iter(t[m*4:])]*2),1):
    for j in range(2501-c):
        row+=j*51+i,
        col+=(j+c)*51+i,
        dat+=d,
d=csgraph.dijkstra(csr_matrix((dat,(row,col)),[8**6]*2),1,min(2500,s)*51+1)
for i in range(2,n+1):print(int(d[i::51].min()))
l= list(map(int input().split()))
if(l[0]==l[1] or l[1]==l[2]) and l[1]!=l[2]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

# cook your dish here
l= list(map(int, input().split()))
if(l[0]==l[1]!=l[2] or l[0]!=l[1]==l[2] or l[0]==l[2]!=l[1]):
  print("Yes")
else:
  print("No")