Harryxun/stf_run huggingface dataset:
import math
a,b,h,m=map(int,input().split())

dh=30*h+m/2
dm=6*m

if dm=dh:
    length=abs(a-b)
else:
    rad=abs(dm-dh)
    
if rad>180:
    rad-=180
    length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))

elif 0<rad and rad<180:
    length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))

elif rad==180:
    length=a+b
    
print(length)

### FIXED CODE ###

import math
a,b,h,m=map(int,input().split())
 
dh=30*h+m/2
dm=6*m
 
if dm==dh:
    rad=0
else:
    rad=abs(dm-dh)
    
if rad>180:
    rad=360-rad
    length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
 
elif 0<rad and rad<180:
    length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
 
elif rad==180:
    length=a+b
    
else:
    length=abs(a-b)
    
print(length)
while True:
    points = list(map(int,input().split()))

    if points == [-1,-1,-1]:
        break

    gou = points[0] + points[1]
    if -1 in points[0] or -1 in points[1]:
        print("F")
    elif gou >= 80:
        print("A")
    elif 65 <= gou < 80:
        print("B")
    elif 50 <= gou < 65:
        print("C")
    elif 30 <= gou < 50:
        if points[2] >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

### FIXED CODE ###

while True:
    points = list(map(int,input().split()))

    if points == [-1,-1,-1]:
        break

    gou = points[0] + points[1]
    if points[0]==-1 or points[1]==-1:
        print("F")
    elif gou >= 80:
        print("A")
    elif 65 <= gou < 80:
        print("B")
    elif 50 <= gou < 65:
        print("C")
    elif 30 <= gou < 50:
        if points[2] >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")
inp = []
tmp = 9
ans = 0
for _ in range(5):
    inp.append(input())
for i in range(5):
    if tmp > int(inp[i][-1]) and int(inp[i][-1]) != 0:
        tmp = int(inp[i][-1])
        temp = i

last = inp.pop(temp)
print(last)
for j in inp:
    print(ans)
    if j[-1] == "0":
        ans += int(j)
    else:
        ans += int(j[:-1]+ "0") + 10
ans += int(last)
print(ans)

### FIXED CODE ###

inp = []
tmp = 10
ans = 0
temp = 0
for _ in range(5):
    inp.append(input())
for i in range(5):
    if tmp > int(inp[i][-1]) and int(inp[i][-1]) != 0:
        tmp = int(inp[i][-1])
        temp = i
last = inp.pop(temp)
for j in inp:
    if j[-1] == "0":
        ans += int(j)
    else:
        ans += int(j[:-1]+ "0") + 10
ans += int(last)
print(ans)
n=int(input())
T=[int(input()) for _ in range(n)]

def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    return gcd(y, x%y)

ans=1
for t in T:
    g=gcd(ans, t)
    ans=int(ans*t/g)

print(ans)

### FIXED CODE ###

import numpy as np
n=int(input())
T=np.array([int(input()) for _ in range(n)], dtype=np.int64)

def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    return gcd(y, x%y)

ans=1
for t in T:
    ans*=t//gcd(t, ans)

print(ans)
import math
N = int(input())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


print(lcm(2, N))

### FIXED CODE ###

N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2 * N)
import sys
from collections import deque

import numpy as np

sys.setrecursionlimit(100000000)


def solve(n, arr, q, path, c):
  flag = True
  for i in path:
    if path[i] == 0:
      flag = False
  if flag:
    return path
  if c > 100000000:
    return -1
  if len(q) == 0:
    return -1
  pos = q.popleft()
  for i in range(1, n):
    if arr[pos][i] == 1:
      q.append(i)
      if path[i+1] == 0:
        path[i+1] = pos+1
  return solve(n, arr, q, path, c+1)
        

def calc(n, arr):
  path = {i:0 for i in range(2, n+1)}
  queue = deque([0])
  result = solve(n, arr, queue, path, 0)
  if result == -1:
    return ["No"]
  else:
    L = ["Yes"]
    for i in result:
      L.append(result[i])
    return L

n, m = map(int, input().split())
arr = np.zeros([n, n])
for i in range(m):
  tmp0, tmp1 = map(int, input().split())
  arr[tmp0-1][tmp1-1] = 1
  arr[tmp1-1][tmp0-1] = 1

answer = calc(n, arr)
for i in answer:
  print(i)

### FIXED CODE ###

from collections import deque

def main():
    n,m = map(int,input().split())
    ab = [[] for i in range(n)]
    for _ in range(m):
        a,b = map(int,input().split())
        ab[a-1].append(b-1)
        ab[b-1].append(a-1)
    q = deque()
    q.append(0)
    ans = [-1] * n
    ans[0] = 0
    while q:
        now = q.popleft()
        for i, next in enumerate(ab[now]):
            if ans[next] == -1:
                ans[next] = now+1
                q.append(next)
        if len(q) == 0:
            break
    print('Yes')
    for i in range(1,n):
        print(ans[i])



if __name__=='__main__':
    main()
A, B, C, D, E, F = map(int, input().split())

tmp_c = 0

for a in range(0, F+1, A*100):
    for b in range(0, F+1, B*100):
        for c in range(0, int(F/100 * E) + 1, C):
            for d in range(0, int(F/100 * E) + 1, D):
                w = a + b
                s = c + d
                if s == 0:
                    concentration = 0
                else:
                    concentration = s / (w + s)
                    
                if concentration <= E / (100 + E) and concentration > tmp_c and w + s <= F:
                    ans_sw = s+w
                    ans_s = s
                    tmp_c = concentration

print(ans_sw, ans_s)                


### FIXED CODE ###

A, B, C, D, E, F = map(int, input().split())

max_c = 0
ans_sw = A*100
ans_s = 0

water = set()
for a in range(0, F + 1, A * 100):
    for b in range(0, F - a + 1, B * 100):
        water.add(a + b)

suger = set()
for c in range(0, F + 1, C):
    for d in range(0, F - c + 1, D):
        suger.add(c + d)

for w in water:
    for s in suger:
        
        if s <= E * w // 100 and 0 < w + s <= F:
            c = s / (w + s)
            if max_c < c:
                max_c = c
                ans_sw = s + w
                ans_s = s

print(ans_sw, ans_s)
n = int(input())
h = list(map(int, input().split()))
if n==1:
    print('Yes')
    exit()
for i in range(n-1):
    if h[n-i] = (h[n-i-1]-1):
        h[n-i-1] -= 1
    elif h[n-i] < (h[n-i-1]-1):
        print('No')
        exit()
print('Yes')

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
if n==1:
    print('Yes')
    exit()
ht = h[-1]
for i in reversed(range(n-1)):
    if ht == h[i]-1:
        h[i]-=1
    elif ht < h[i]-1:
        print('No')
        exit()
    ht = h[i]
print('Yes')
import sys

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


n, X = map(int,input().split())
x = sorted(list(map(int, input().split())) + [X])

if len(x) == 2:
    print(x[1]- x[0])
    sys.exit()

xx = [x[i+1] -x[i] for i in range(len(x)-1)]

g = gcd(xx[0],xx[1])

if len(xx) >= 3:
    for i in range(2,n-1):
        g = gcd(g,xx[n])

print(g)

### FIXED CODE ###

import sys

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


n, X = map(int,input().split())
x = sorted(list(map(int, input().split())) + [X])

if len(x) == 2:
    print(x[1]- x[0])
    sys.exit()

xx = [x[i+1] -x[i] for i in range(len(x)-1)]

g = gcd(xx[0],xx[1])

if len(xx) >= 3:
    for i in range(2,n):
        g = gcd(g,xx[i])

print(g)
#
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    n = int(input())
    s = input()
    ans = 1

    for i in range(1, n):
        if s[i-1] != s[i]:
            ans += 1
    print(ans)

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

### FIXED CODE ###

#
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    n = int(input())
    s = input()
    ans = 1

    for i in range(1, n):
        if s[i-1] != s[i]:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()
N = int(input())
A = list(map(int,input().split()))
U = [0]*(10**6+1)
for e in A:
    U[e] += 1
ans = 0
for k in range(1,10**6+1+1):
    if U[k] == 1:
        ans += 1
    if U[k] > 0:
        for l in range(2*k,10**6+1+1,k):
            if U[l] > 0:
                U[l] += 1
print(ans)


### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
U = [0]*(10**6+1)
for e in A:
    U[e] += 1
ans = 0
for k in range(1,10**6+1):
    if U[k] == 1:
        ans += 1
    if U[k] > 0:
        for l in range(2*k,10**6+1,k):
            if U[l] > 0:
                U[l] += 1
print(ans)
n=int(raw_input())
A=map(int, raw_input().split())
q=int(raw_input())
m=map(int, raw_input().split())

def solve(c, m):
  if m == 0:
    return 1
  if c >= n or sum(A)<m:
    return 0
  res = solve(c + 1, m) or solve(c + 1, m - A[c])
  return res

for i range(0,q):
  if solve(0,m[i])==1:
    print "yes"
  else:
    print "no"

### FIXED CODE ###

n=int(raw_input())
A=map(int, raw_input().split())
q=int(raw_input())
m=map(int, raw_input().split())

def solve(j, m):
  if m == 0:
    return 1
  if j >= n or m > sum(A):
    return 0
  res = solve(j + 1, m) or solve(j + 1, m - A[j])
  return res

for i in range(0,q):
  if solve(0,m[i]):
    print "yes"
  else:
    print "no"
from collections import defaultdict
N = int(input())
d = defaultdict(int)
sx, sy = map(int, input().split())

for i in range(1, N):
    x, y = map(int, input().split())
    d[(x-sx, y-sy)] += 1
    sx, sy = x, y

print(N - max(d.values()))


### FIXED CODE ###

from collections import defaultdict
N = int(input())
p = defaultdict(int)
balls = [list(map(int, input().split())) for i in range(N)]

c = 0
if len(balls) <= 2:
    print(1)
else:
    for i in balls:
        for j in balls:
            c += 1
            if i == j:
                continue
            p[(j[0]-i[0]), j[1]-i[1]] += 1
    print(N-max(p.values()))
print(700 + 100*input().count(o))

### FIXED CODE ###

print(700 + 100*input().count("o"))
print("Yes" if "A" in input() and "B" in input() else "No"

### FIXED CODE ###

s=input()
print("Yes" if "A" in s and "B" in s else "No")
n = int(input())
count = 0
 
for i in range(1,n+1):
  if len(int(i))//2 == 1:
    count += 1
 
print(count)

### FIXED CODE ###

a,b,c = map(int, input().split())
 
if b+c > a :
  print(c-(a-b))
  
else:
  print(0)
A,B,N = map(int,input().split())
a = 0

for x in range(N+1):
    if (int((A*x)/B)-A*int(x/B)) > a:
        a = (int((A*x)/B)-A*int(x/B))
print(a) 

### FIXED CODE ###

K = int(input())
A,B = map(int,input().split())
list = []
n = range(A,B+1)
ind = range(B-A+1)
for i in n:
    list.append(i)
counter = 0

for i in ind:
    if list[i] % K == 0:
        counter += 1
    else:
        counter += 0
if counter >= 1:
    print("OK")
else:
    print("NG")
#b strings with the same length
n=int(input())
sentence=input().split()
ans=""
for i in range(n):
    ans+=sentence[i]
print(ans)

### FIXED CODE ###

#b strings with the same length
n=int(input())
sentence=input().split()
ans=""
for i in range(n):
    ans=ans+sentence[0][i]+sentence[1][i]
print(ans)
n, k = [int(i) for i in input().split()]
p = [int(i) for i in input().split()]
q = [0] * (n + 1)
for i in range(n):
    q[i+1] = q[i] + p[i]
mx = 0
mx_num = 0
for i in range(n-2):
    if mx < q[i+3] - q[i]:
        mx_num = i

ans = 0
for i in range(3):
    t = p[mx_num + i]
    ans += (t + 1) / 2

print(ans)
    


### FIXED CODE ###

from itertools import accumulate

n, k = [int(i) for i in input().split()]
p = [int(i) for i in input().split()]
c = [0] + list(accumulate(p))
mx = 0
mx_n = 0
for i in range(len(c)-k):
    if mx < c[i+k] - c[i]:
        mx = c[i+k] - c[i]
        mx_n = i
ans = 0
for i in range(k):
    ans += (p[mx_n + i] + 1) / 2

print(ans)
import sys
MOD=(10**9) + 7
x,y=map(int,input().split())

if((x+y)%3!=0):
    print(0)
    sys.exit()

n=((x+y)//3) + 1
k=y-(n-2)

fac=[0 for _ in range(n)]   #n!
finv=[0 for _ in range(n)]  #1/n!
inv=[0 for _ in range(n)]   #

fac[0]=1
fac[1]=1
finv[0]=1
finv[1]=1
inv[1]=1

for i in range(2,n):
    fac[i]=fac[i-1]*i%MOD
    inv[i]=MOD - inv[MOD%i] * (MOD//i)%MOD
    finv[i]=finv[i-1]*inv[i]%MOD

print( fac[n-1] * (finv[k-1] * finv[n - k] % MOD) % MOD )

### FIXED CODE ###

import sys
MOD=(10**9) + 7
x,y=map(int,input().split())

if((x+y)%3!=0):
    print(0)
    sys.exit()

n=((x+y)//3) + 1
k=y-(n-2)

fac=[0 for _ in range(n)]   #n!
finv=[0 for _ in range(n)]  #1/n!
inv=[0 for _ in range(n)]   #

fac[0]=1
fac[1]=1
finv[0]=1
finv[1]=1
inv[1]=1

for i in range(2,n):
    fac[i]=fac[i-1]*i%MOD
    inv[i]=MOD - inv[MOD%i] * (MOD//i)%MOD
    finv[i]=finv[i-1]*inv[i]%MOD

def ncr(n,k):
    if(n < k):
        return 0
    elif(n < 0 or k < 0):
        return 0
    else:
        return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD


print(ncr(n-1,k-1))
a, b = map(int, input().split())
    s = input()
     
    if s[a] == '-' and s[:a].isdigit() and s[a+1:].isdigit():
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

A, B =map(int, input().split())
S = input()
NUM = list(range(10))
X = 0
while X != A+B+1:
    if X == A:
        if S[X] != "-":
            print("No")
            quit()
        X += 1
    else:
        if S[X] == "-":
            print("No")
            quit()
        if int(S[X]) in NUM:
            X += 1
        else:
            print("No")
            quit()
print("Yes")
l=raw_input().split()
 
print((l[0]-1)*(l[1]-1)+1)

### FIXED CODE ###


a,b=map(int,input().split())
 
print((a-1)*(b-1))
s = input()

ans = True

if len(s) == 1:
    print('No')
    exit(0)

while len(s) > 0:
    if s[0] == 'h' and s[1] == 'i':
        s = s[2:]
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = input()

ans = True

while len(s) > 0:
    if len(s) == 1:
        print('No')
        exit(0)
    if s[0] == 'h' and s[1] == 'i':
        s = s[2:]
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')
a = int(input())
b = [list(map(int, input().split())) for i in range(a)]
import math
c = math.factorial(a)//(a-1)
count = 0
for i in range(a-1):
  for j in range(i+1:a):
    count += ((b[i][0]-b[j][0])*2+(b[i][1]-b[j][1])*2)*0.5
print(count*c)

### FIXED CODE ###

N = int(input())

P = []

S = 0

for i in range(N):
   P.append(list(map(int,input().split())))


for i in range(N-1):
   for j in range(N-1-i):
       
       S += (((P[i][0] - P[i+j+1][0])**2 + (P[i][1] - P[i+j+1][1])**2)**0.5)*2
       
print(S/N)
N, M, X, Y = map(int, input().split())
x = list(int(input())
y = list(int(input())
if max(x) < min(y):
    for i in range(max(x),min(y)):
        if max(x) < i <= min(y):
             print("No War")
             break
print("War")
             


### FIXED CODE ###

N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for i in range(X, Y+1):
  if X < i <= Y and max(x) < i <= min(y):
    print("No War")
    exit()
print("War")
N = int(input())
S_list = list(map(str, input().split()))

for i in range(N):
  S_list.remove(S_list[i])
  N -= (N-len(S_list)-1)
  
print(N)  

### FIXED CODE ###

N = int(input())
S = [input() for _ in range(N)]
print(len(set(S)))
orders = [int(input()) for _ in range(5)]

rest = []
time = 0
for order in orders:
    if order % 10 == 0:
        time += order
    else:
        rest.append(order)

rest_mods = list(map(lambda x: x % 10, rest))
min_mods_index = rest_mods.index(min(rest_mods))
for i in range(len(rest)):
    time += rest[i]
    if i != min_mods_index:
        time += 10 - rest[i] % 10
print(time)


### FIXED CODE ###

orders = [int(input()) for _ in range(5)]

rest = []
time = 0
for order in orders:
    if order % 10 == 0:
        time += order
    else:
        rest.append(order)

rest_mods = list(map(lambda x: x % 10, rest))

if len(rest_mods) > 0:
    min_mods_index = rest_mods.index(min(rest_mods))
    for i in range(len(rest)):
        time += rest[i]
        if i != min_mods_index:
            time += 10 - rest[i] % 10
else:
    time += sum(rest)
print(time)
a,b,c,d=map(int,input().split())
e=c-a
f=d-b
g=c-f
h=d+e
i=g-e
j=h-f
print(list[g,h,i,j])

### FIXED CODE ###

a,b,c,d=map(int,input().split())
e=c-a
f=d-b
g=c-f
h=d+e
i=g-e
j=h-f
print(g)
print(h)
print(i)
print(j)
def main():
    mod = 1000000007
    N, M, *A = map(int, open(0).read().split())
    F = [0] * (N + 1)
    # A.sort() 制約で単調性は保証されている
    F[0] = 1
    if not A[0] == 1:
        F[1] = 1
    for i in range(2, N + 1):
        if i not in A:
            F[i] = (F[i-1] + F[i-2]) % mod
    print(F[-1])


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    mod = 1000000007
    N, M, *A = map(int, open(0).read().split())
    A = set(A)
    F = [0] * (N + 1)
    F[0] = 1
    if 1 not in A:
        F[1] = 1
    for i in range(2, N + 1):
        if i not in A:
            F[i] = (F[i-1] + F[i-2]) % mod
    print(F[N])


if __name__ == "__main__":
    main()
N, M = map(int, input().split())
ans = 0
st = {*list(range(1, N+1))}
for _ in range(M):
    a, b = map(int, input().split())
    st.intersection_update({*list(range(a, b+1))})
print(len(st))

### FIXED CODE ###

N, M = map(int, input().split())
L = []
R = []
for i in range(M):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
Lmax = max(L)
Rmin = min(R)
if Lmax>Rmin:
    print(0)
else:
    print(Rmin-Lmax+1)
A = list(map(int, input.split()))

print("bust" if sum(A)>=22 else "win")


### FIXED CODE ###


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

print("bust" if sum(A)>=22 else "win")
def solve(n, m, NUM):
    for i in range(len(m)):
        if n[NUM + i] is not m[i]:
            return -1
    return 1


N, M = [int(i) for i in input().split()]
n_pic = [input() for i in range(N)]
m_pic = [input() for i in range(M)]
num = 0
if M is 1:
    for n in n_pic:
        if -1 is not n.find(m_pic[0]):
            print('Yes')
            exit()
    print('No')
    exit()

for n in n_pic:
    for n_len in range(N - M + 1):
        while -1 is not solve(n, m_pic[num], n_len):
            num += 1
        if num is M - 1:
            print('Yes')
            exit()
        num = 0
print('No')


### FIXED CODE ###

def solve(n, m, NUM):
    for i in range(len(m)):
        if n[NUM + i] is not m[i]:
            return -1
    return 1


N, M = [int(i) for i in input().split()]
n_pic = [input() for i in range(N)]
m_pic = [input() for i in range(M)]
num = 0
if M is 1:
    for n in n_pic:
        if -1 is not n.find(m_pic[0]):
            print('Yes')
            exit()
    print('No')
    exit()

for n in range(N - M + 1):
    for n_len in range(N - M + 1):
        while -1 is not solve(n_pic[n + num], m_pic[num], n_len):
            num += 1
            if num is M:
                print('Yes')
                exit()
        num = 0
print('No')
a,b=input().split()
if a=="H":
  f=True
else:
  f=False
if f:
  print("H" if b=="H" else "D")
else:
  print("H" if b=="D" else "D"

### FIXED CODE ###

a,b=input().split()
if a=="H":
  f=True
else:
  f=False
if f:
  print("H" if b=="H" else "D")
else:
  print("H" if b=="D" else "D")
n = int(input())
p = list(map(int,input().split()))
ans = 0
temp = 0
for i in range(n):
    """
    for j in range(i+1):
        if p[i]<=p[j]:
            temp+=1
        if temp == i+1:
            #print("i:"+str(i))
            ans+=1
    temp=0
            """
    if min(p[:i+1]) == p[i]:
        #print("i:"+str(i))
        ans+=1
print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
if n == m:
    print("Yes")
else:
    print("No")
import sys

input = sys.stdin.readline

def main():
    md = 998244353
    s = input()[:-1]
    n = len(s)
    if s.count(s[0]) == n:
        print(1)
        exit()
    if n == 2:
        print(2)
        exit()
    if n == 3:
        if s[0] == s[-1]:
            print(7)
        elif s[0] == s[1] or s[1] == s[2]:
            print(6)
        else:
            print(3)
        exit()
    ord0 = ord("a")
    a = [ord(c) - ord0 for c in s]
    r = sum(a) % 3
    dp = [[[[0] * 3 for _ in range(2)] for _ in range(3)] for _ in range(n)]
    for m in range(3):
        dp[0][m][0][m] = 1
    # print(a)
    # print(dp)
    for i in range(n - 1):
        dpi = dpi1
        dpi1 = dp[i + 1]
        for j in range(3):
            dpij = dpi[j]
            for k in range(2):
                dpijk = dpij[k]
                for m in range(3):
                    pre = dpijk[m]  # iけた j余り k連続有無 m前の位
                    for nm in range(3):
                        nj = (j + nm) % 3
                        if nm == m:
                            dpi1[nj][1][nm] = (dpi1[nj][1][nm] + pre) % md
                        else:
                            dpi1[nj][k][nm] = (dpi1[nj][k][nm] + pre) % md
    d = 1
    for a0, a1 in zip(a, a[1:]):
        if a0 == a1:
            d = 0
            break
    print((sum(dp[n - 1][r][1]) + d) % md)

main()


### FIXED CODE ###

def main():
    md = 998244353
    s = input()
    n = len(s)
    if s.count(s[0]) == n:
        print(1)
        exit()
    if n == 2:
        print(2)
        exit()
    if n == 3:
        if s[0] == s[-1]:
            print(7)
        elif s[0] == s[1] or s[1] == s[2]:
            print(6)
        else:
            print(3)
        exit()
    ord0 = ord("a")
    a = [ord(c) - ord0 for c in s]
    r = sum(a) % 3
    dp = [[[[0] * 3 for _ in range(2)] for _ in range(3)] for _ in range(n)]
    for m in range(3):
        dp[0][m][0][m] = 1
    # print(a)
    # print(dp)
    for i in range(n - 1):
        for j in range(3):
            for k in range(2):
                for m in range(3):
                    pre = dp[i][j][k][m]  # iけた j余り k連続有無 m前の位
                    for nm in range(3):
                        nj = (j + nm) % 3
                        if nm == m:
                            dp[i + 1][nj][1][nm] = (dp[i + 1][nj][1][nm] + pre) % md
                        else:
                            dp[i + 1][nj][k][nm] = (dp[i + 1][nj][k][nm] + pre) % md
    d = 1
    for c0, c1 in zip(s, s[1:]):
        if c0 == c1:
            d = 0
            break
    print((sum(dp[n - 1][r][1]) + d) % md)

main()
cards = [([False in i in range(13)] for j in range(4)]
pattern = ['S','H','C','D']

n = int(input())

for i in range(n):
  x, y = input().split()
  y = int(y)
  cards[pattern.index(x)][y-1] = True
  
for i in range(4):
  for j in range(13):
    if cards[i][j] == False:
      print(pattern[i],[j-1])


### FIXED CODE ###

n = int(input())
card =[i+" "+str(j) for i in ["S","H","C","D"] for j in range(1,14)]
for i in range(n):
    card.remove(input())
for i in card:
    print(i)
s = input()
l = len(s)
ans = 0
for i in range(2**(l-1)):
    e = ""
    for j in range(l):
        if ((i >> j) & 1):
            e += s[j] + "+"
        else:
            e += s[j] + "-"
    if eval(e) == 7:
        print('{}=7'.format(e))
        break

### FIXED CODE ###

s = input()
l = len(s)
ans = 0
for i in range(2**(l-1)):
    e = ""
    for j in range(l):
        if ((i >> j) & 1):
            e += s[j] + "+"
        else:
            e += s[j] + "-"
    if eval(e[:-1]) == 7:
        print(e[:-1]+'=7')
        break
*a = map(int, input().split())

print(max(a)-min(a))

### FIXED CODE ###

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

print(max(a)-min(a))
moji = input()
if (moji[0]==moji[1]):
  print("Yes")
else: 
  print("No)

### FIXED CODE ###

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