Harryxun/stf_run huggingface dataset:
from math import gcd
def lcm(i, j):
  return i * j // gcd(i, j)
def main():
  while True:
    n = int(input())
    if not n: break
    lst = [[]]
    weight = [-1 for i in range(n + 1)]
    def setWeight(n):
      p, q, r, b = lst[n]
      if weight[n] != -1: pass
      elif r == 0 and b == 0:
        weight[n] = (p + q) // gcd(p, q)
      elif r == 0:
        setWeight(b)
        l = lcm(weight[b] * q, p)
        weight[n] = l // q + l // p
      elif b == 0:
        setWeight(r)
        l = lcm(weight(r) * p, q)
        weight[n] = l // p + l // q
      else:
        if weight[r] == -1: setWeight(r)
        if weight[b] == -1: setWeight(b)
        l = lcm(weight[r] * p, weight[b]  * q)
        weight[n] = l // p + l // q
    for i in range(n):
      lst.append(list(map(int,input().split())))
    for i in range(0, n):
      if weight[i + 1] == -1:
        setWeight(i + 1)
    print(max(weight))

main()


### FIXED CODE ###


from math import gcd
def lcm(i, j):
  return i * j // gcd(i, j)
def main():
  while True:
    n = int(input())
    if not n: break
    lst = [[]]
    weight = [-1 for i in range(n + 1)]
    def setWeight(n):
      p, q, r, b = lst[n]
      if weight[n] != -1: pass
      elif r == 0 and b == 0:
        weight[n] = (p + q) // gcd(p, q)
      elif r == 0:
        setWeight(b)
        l = lcm(weight[b] * q, p)
        weight[n] = l // q + l // p
      elif b == 0:
        setWeight(r)
        l = lcm(weight[r] * p, q)
        weight[n] = l // p + l // q
      else:
        if weight[r] == -1: setWeight(r)
        if weight[b] == -1: setWeight(b)
        l = lcm(weight[r] * p, weight[b]  * q)
        weight[n] = l // p + l // q
    for i in range(n):
      lst.append(list(map(int,input().split())))
    for i in range(0, n):
      if weight[i + 1] == -1:
        setWeight(i + 1)
    print(max(weight))

if __name__ == '__main__':
  main()
N, Y = map(int, input().split())
Y //= 1000
i = 0
f = 0
whlie 1:
  if 10 * i > Y:
    break
  y = Y - 10 * i
  n = N - i
  if n <= y <=  5 * n and (y - n) % 4 == 0:
    print(str(i) + " " + str((y-n)//4) + " " + str((5 * n - y) // 4))
    f = 1
  i += 1
if f == 0:
  print("-1 -1 -1")

### FIXED CODE ###

N, Y = map(int, input().split())
Y //= 1000
i = 0
f = 0
while 1:
  if 10 * i > Y:
    break
  y = Y - 10 * i
  n = N - i
  if n <= y <=  5 * n and (y - n) % 4 == 0:
    print(str(i) + " " + str((y-n)//4) + " " + str((5 * n - y) // 4))
    f = 1
    break
  i += 1
if f == 0:
  print("-1 -1 -1")
import math
import numpy as np
import queue
from collections import deque
import heapq
mod = 10**9+7
ans = 1

def twoxxn(t,mod):
    ni = t
    an = 1
    n2 = 2
    while ni > 0:
        if ni%2 == 1:
            an = (an*n2)%mod
        n2 = (n2**2)%mod
        ni //= 2
    return an

n = int(input())
d = dict()
for i in range(n):
    a,b = map(int,input().split())
    if a < 0 :
        a = -a
        b = -b
        g = math.gcd(abs(a),abs(b))
    if a == 0 and b == 0:
        continue
    else:
        if a == 0:
            b = 1
            g = 1
        elif b == 0:
            a = 1
            g = 1
        p1 = str(a//g)+" "+str(b//g)
        if p1 in d:
            d[p1] += 1
        else:
            d[p1] = 1

for i in d.keys():
    i0, i1 = map(int,i.split())
    if str(i1)+" "+str(-i0) in d:
        if d[i] == 0:
            continue
        aaa = (twoxxn(d[str(i1)+" "+str(-i0)],mod)+twoxxn(d[i],mod)-1)%mod
        ans = (ans*aaa)%mod
        d[str(i1)+" "+str(-i0)] = 0
    elif str(-i1)+" "+str(i0) in d:
        if d[i] == 0:
            continue
        aaa = (twoxxn(d[str(-i1)+" "+str(i0)],mod)+twoxxn(d[i],mod)-1)%mod
        ans = (ans*aaa)%mod
        d[str(-i1)+" "+str(i0)] = 0
    else:
        ans = (ans*twoxxn(d[i],mod))%mod

if ans == 1:
    print(1)
    exit()
ans = (ans-1)%mod
print(ans)


### FIXED CODE ###

import math
import numpy as np
import queue
from collections import deque
import heapq
mod = 10**9+7
ans = 1
iw0 = 0

def twoxxn(t,mod):
    ni = t
    an = 1
    n2 = 2
    while ni > 0:
        if ni%2 == 1:
            an = (an*n2)%mod
        n2 = (n2**2)%mod
        ni >>= 1
    return an

n = int(input())
d = dict()
for i in range(n):
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        iw0 += 1
        continue
    if a == 0:
        b = 1
        g = 1
    elif b == 0:
        a = 1
        g = 1
    else:
        g = math.gcd(abs(a),abs(b))
    if a < 0 :
        a = -a
        b = -b
    p1 = a//g, b//g
    if p1 in d:
        d[p1] += 1
    else:
        d[p1] = 1
done = []
for (i0,i1), din in d.items():
    if d.get((-i1,i0),1) == 0 or d.get((i1,-i0),1) == 0:
        continue
    w = d.get((i1,-i0),0) + d.get((-i1,i0),0)
    aaa = (twoxxn(w,mod)+twoxxn(din,mod)-1)%mod
    ans = (ans*aaa)%mod
    d[(i0,i1)] = 0

if len(d.keys()) == 0:
    print(iw0)
    exit()

ans = (iw0+ans+mod-1)%mod
print(ans)
from math import sqrt, ceil
import fractions
A, B = map(int, input().split())


def era_prime(N):
    temp = [True]*(N+1)
    temp[0] = temp[1] = False
    for i in range(2, ceil(sqrt(N+1))):
        if temp[i]:
            temp[i+i::i] = [False]*(len(temp[i+i::i]))
    primes = [n for n in range(N+1) if temp[n]]
    return primes


prime_list = era_prime(fractions.gcd(A, B))
ans = 1


for i in range(2, fractions.gcd(A, B)+1):
    if A % i == 0 and B % i == 0:
        if i in prime_list:
            ans += 1

print(ans)


### FIXED CODE ###

from math import sqrt, ceil
import fractions
A, B = map(int, input().split())


def is_prime(n):
    if n == 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


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


ans = 1

tmp = make_divisors(fractions.gcd(A, B))

for x in tmp:
    if is_prime(x):
        ans += 1

print(ans)
import sys
r = sys.argv[1]
print(int(r) ** 2)


### FIXED CODE ###

r = input()
print(int(r) ** 2)
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,k = iim()
A = iil()
d = {0:True}
l = [0]
def move(num):
    l.append(A[num]-1)
    if d.get(A[num]-1,False):
        return True if A[num]-1 == 0 else False
    else:
        d[A[num]-1] = True
        return move(A[num]-1)

if move(0):
    rep = len(l)-1
    ini = 0
else:
    ini = l.index(l[-1])
    rep = len(l)-ini-1
if k <= ini:
    print(l[k]+1)
else:
    mod = (k-ini)%rep
    if mod == 0:
        mod = rep
#    print(l,mod,rep,ini)
    print(l[ini+mod]+1)

### FIXED CODE ###

def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
import sys 
sys.setrecursionlimit(10000000)


n,k = iim()
A = iil()
d = {0:True}
l = [0]
def move(num):
    l.append(A[num]-1)
    if d.get(A[num]-1,False):
        return True if A[num]-1 == 0 else False
    else:
        d[A[num]-1] = True
        return move(A[num]-1)

if move(0):
    rep = len(l)-1
    ini = 0
else:
    ini = l.index(l[-1])
    rep = len(l)-ini-1

if k <= ini:
    print(l[k]+1)
else:
    mod = (k-ini)%rep
    if mod == 0:
        mod = rep
#    print(l,mod,rep,ini)
    print(l[ini+mod]+1)
n, m, l = map(int, input().split())

A = []
B = []

for i in range(n):
    A.append([int(j) for j in input().split()])

for i in range(m):
    B.append([int(j) for j in input().split()])

# ??????????????????????????????B?????¢??????????????¨???????????????
B_T = list(map(list, zip(*B)))

C = [[0 for i in range(n)] for j in range(l)]

for i in range(n):
    for j in range(l):
        C[i][j] = sum([a * b for (a, b) in zip(A[i], B_T[j])])

for i in range(n):
    print(*C[i])

### FIXED CODE ###


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

A = []
B = []

for i in range(n):
    A.append([int(j) for j in input().split()])

for i in range(m):
    B.append([int(j) for j in input().split()])

# ??????????????????????????????B?????¢??????????????¨???????????????
B_T = list(map(list, zip(*B)))

C = [[0 for j in range(l)] for i in range(n)]

for i in range(n):
    for j in range(l):
        C[i][j] = sum([a * b for (a, b) in zip(A[i], B_T[j])])

for i in range(n):
    print(*C[i])
N = int(input())
W = [input() for i in range(N)]

if [W[i][-1] for i in range(N-1)] == [W[i+1][0] for i in range(N-1)] and len(list(set(W))) = len(W):
    print ("Yes")
else:
    print ("No")

### FIXED CODE ###

N = int(input())
Ws = [input() for i in range(N)]

ret = "Yes"
if len(Ws) != len(list(set(Ws))):
    ret = "No"
    
for i in range(N-1):
    if Ws[i][-1] != Ws[i+1][0]:
        ret = "No"
    
    
print (ret)
H,W=map(int,input().split())
field=[["."]*(W+2)]
for i in range(H):
    field.append(["."])
    field[-1].extend(list(input()))　#ここらへんミスりそうでこわひ
    field[-1].append(".")
field.append(["."]*(W+2))
print(field)
for i in range(1,H+1):
    for j in range(1,W+1):
        if field[i][j]=="#":
            print("#",end="")
        else:
            cnt=0
            for dy in range(-1,2):
                for dx in range(-1,2):
                    if field[i+dy][j+dx]=="#":
                        cnt+=1
            print(cnt,end="")
    print("")

### FIXED CODE ###

H,W=map(int,input().split())
field=[["."]*(W+2)]
for i in range(H):
    field.append(["."])
    field[-1].extend(list(input()))
    field[-1].append(".")
field.append(["."]*(W+2))
for i in range(1,H+1):
    for j in range(1,W+1):
        if field[i][j]=="#":
            print("#",end="")
        else:
            cnt=0
            for dy in range(-1,2):
                for dx in range(-1,2):
                    if field[i+dy][j+dx]=="#":
                        cnt+=1
            print(cnt,end="")
    print("")
K = input()
k=K.split('\n')
N,M,X=map(int, k[0].split())
A = [i for i in map(int, k[1].split())]
squares=[i for i in range(N+1)]



V=squares[X]
lowest=[]
highest =[]
for i in range(len(A)):
    if A[i]<V:
        lowest.append(A[i])
    else:
        highest.append(A[i])

if len(lowest)>len(highest):
    cost = len(highest)
else:
    cost = len(lowest)

print(cost)
       

### FIXED CODE ###


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

A = [i for i in map(int, input().split())]
squares=[i for i in range(N+1)]
V=squares[X]
lowest=[]
highest =[]
for i in range(len(A)):
    if A[i]<V:
        lowest.append(A[i])
    else:
        highest.append(A[i])
if len(lowest)>len(highest):
    cost = len(highest)
else:
    cost = len(lowest)

print(cost)
in = [int(i) for i in input()]
print(max(in[0] * in[1], in[2] * in[3]]))

### FIXED CODE ###

a,b,c,d= [int(i) for i in input().split()]
print(max(a * b, c * d))
import math
n,k = map(int,input().split())

def f(i,k,n):
     if i<k:
          m = math.ceil(math.log2(k/i))
          return ((1/2)**m)/n
     else:
          return 1/n

ans = 0
for i in range(1,n+1):
     ans += f(i,k,n)

print(ans)

### FIXED CODE ###

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

def f(i,k,n):
     if i<k:
          m = math.ceil(math.log2(k/i))
          return ((1/2)**m)/n
     else:
          return 1/n

ans = 0
for i in range(1,n+1):
     ans += f(i,k,n)

print(ans)
S = list(input())
K = int(input())

for i in range(K):
    if S[i] == '1':
        if i == K:
            res = 1
        else:
            continue
    else:
        res = S[i]
        break
print(res)


### FIXED CODE ###

S = list(input())
K = int(input())

res =0
for i in range(K):
    if S[i] == '1':
        if i == K-1:
            res = 1
        else:
            continue
    else:
        res = S[i]
        break
print(res)
import math
a, b = map(int, input().split())
ans = (a*b)//math.gcd(a, b)
print(ans)

### FIXED CODE ###

import fractions
a, b = map(int, input().split())
ans = (a * b) // fractions.gcd(a, b)
print(ans)
import numpy as np

class Node:
    def __init__(self, val):
        self.num = val
        self.nodes = []
        self.distance = []

def set_color(node, color):
    if color_list[node.num] == None:
        color_list[node.num] = color
        for child, dist in zip(node.nodes, node.distance):
            if child != node:
                if dist == 0:
                    set_color(child, color)
                else:
                    set_color(child, not color)

N= int(input())

node_list = [Node(i) for i in range(N)]
color_list = np.array([None for i in range(N)])

for i in range(N-1):
    u, v, w = map(int, input().split())
    x = node_list[u-1]
    y = node_list[v-1]
    w = w % 2
    x.nodes.append(y)
    x.distance.append(w)
    y.nodes.append(x)
    y.distance.append(w)

set_color(node_list[0], True)

for i in np.array(color_list, dtype=int):
    print(i)


### FIXED CODE ###

import sys
from collections import deque
input = sys.stdin.readline

class Node:
    def __init__(self):
        self.color = 0
        self.check = False
        self.link = []

def main():
    N = int(input())

    nodes = [Node() for i in range(N)]
    
    for i in range(N-1):
        u, v, w = map(int, input().split())
        nodes[u-1].link.append((nodes[v-1], w&1))
        nodes[v-1].link.append((nodes[u-1], w&1))
    
    q = deque()
    q.append((nodes[0], 1))
    while len(q) > 0:
        node, color = q.popleft()
        node.color = color
        node.check = True
        for nex, weight in node.link:
            if not nex.check:
                if weight == 0:
                    q.append((nex, color))
                else:
                    q.append((nex, -color))
    
    for i in range(N):
        print((nodes[i].color + 1) // 2)

if __name__ == "__main__":
    main()
N=int(input())
A=list(map(int,input().split()))

for i in range(N):
    A0=A.copy()
    A0.pop(i)
    A0=sorted(A0)
    
    ii=0
    C=0
    L=0
    while ii<N-1:
        C=A0.count(A0[ii])
        ii+=C
        L=int(C*(C-1)/2)+L
    print(L)

### FIXED CODE ###

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

L=0
C=[0]*N

for i in range(N):
    C[A[i]-1]+=1

for i in range(N):
    L+=int(C[i]*(C[i]-1)/2)
    
for i in A:
    print(L-C[i-1]+1)
x, n = map(int, input().split())

if n != 0:
    p = list(map(int, input().split()))
else:
    print(x)
    exit(1)

dif = 100
ans = 0

for i in range(min(p) - 1, max(p) + 2):
    if not (i in p):
        if dif > abs(x - i):
            dif = abs(x - i)
            ans = i

print(ans)


### FIXED CODE ###

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

if n != 0:
    p = list(map(int, input().split()))
else:
    print(x)
    exit()

dif = 100
ans = 0

for i in range(min(p) - 1, max(p) + 2):
    if not (i in p):
        if dif > abs(x - i):
            dif = abs(x - i)
            ans = i

print(ans)
k, x = list(map(int, input().split))
print('Yes') if k *500 <= x else print('No')

### FIXED CODE ###

k, x = list(map(int, input().split()))
print('Yes') if k *500 >= x else print('No')
S, T = input().split())
A, B = map(int,input().split())
U = input()
if S == U:
  print(A - 1, B)
else:
  print(A, B - 1)

### FIXED CODE ###

S, T = input().split()
A, B = map(int,input().split())
U = input()
if S == U:
  print(A - 1, B)
else:
  print(A, B - 1)
N = int(input())
count = 0
ans = []
for i in range(N+1):
    count1 = 0
    count2 = 0
    N1 = N - i
    x = i
    while x:
        count1 += x % 6
        x //= 6
    while N1
        count2 += x % 9
        N1 //= 9
    count = count1 + count2
    ans.append(count)
print(min(ans))


### FIXED CODE ###

N = int(input())
count = 0
ans = []
for i in range(N+1):
    count1 = 0
    count2 = 0
    N1 = N - i
    x = i
    while x:
        count1 += x % 6
        x //= 6
    while N1:
        count2 += N1 % 9
        N1 //= 9
    count = count1 + count2
    ans.append(count)
print(min(ans))
n = int( raw_input( ) )
dic = ()
for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic[ word ] = True
	elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" )

### FIXED CODE ###

n = int( raw_input( ) )
dic = set()
for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic.add( word )
	elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" )
a = input()
b = len(list(a))
c = int(a)
d = ''

if b % 2 == 0:
    d = '9' * (b // 2)
    print('0'.join(d))

else:
    if b == 1:
        print(a)
    else:
        d = '9' * (b // 2)
        '0'.join(d)
        d = int(d + '0')
        print(a-d)

### FIXED CODE ###

a = input()
b = len(list(a))
c = int(a)
d = ''

if b % 2 == 0:
    d = '9' * (b // 2)
    print('0'.join(d))

else:
    if b == 1:
        print(a)
    else:
        d = '9' * (b // 2)
        d = '0'.join(d)
        d = int(d + '0')
        print(c - d)
import sys

N = int(input())
old_t = 0
old_x = 0
old_y = 0
for i in sys.stdin:
    a = list(map(int, i.split(' ')))
    t = a[0]
    x = a[1]
    y = a[2]
    if (a[1] > N or a[2] > N):
        print('No')
        sys.exit(0)
    if ((x + y) > t + 1):
        print('No')
        sys.exit(0)
    if (t % 2 != (x + y) % 2):
        print('No')
        sys.exit(0)
    if (abs(x-old_x) + abs(y-old_y) > (t-old_t)):
        print('No')
        sys.exit(0)
    else:
        old_t = t
        old_x = x
        old_y = y
print('Yes')


### FIXED CODE ###

a = list(map(int, input().split(' ')))
b = a[0] * a[1]
r = 'Even' if (b % 2 == 0) else 'Odd'
print(r)
usr = eval(input())
if usr[-1] == usr[-2] and usr[-3] == usr[-4]:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = input()

if s[2] == s[3] and s[4] == s[5]:
    print("Yes")
else:
    print("No")
import math
n=int(input())
k=2
a=[int(i) for i in input().split()]
b=[0]*n
b[n-2]=abs(a[n-1]-a[n-2])
for i in range(n-3,-1,-1):
    c=[]
    for j in range(i+1,min(n,i+k+1)):
        c.append(abs(a[j]-a[i])+b[j])
    b[i]=min(c)
print(b[0])

### FIXED CODE ###

import math
n,k=map(int,input().split())
a=[int(i) for i in input().split()]
b=[0]*n
b[n-2]=abs(a[n-1]-a[n-2])
for i in range(n-3,-1,-1):
    c=[]
    for j in range(i+1,min(n,i+k+1)):
        c.append(abs(a[j]-a[i])+b[j])
    b[i]=min(c)
print(b[0])
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")
class unionFind:
    parent = []
    nums = []

    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.nums = [1]*N

    def root(self, x):
        if x < 0:
            return(0)
        if self.parent[x] == x:
            return(x)
        else:
            self.parent[x] = self.root(self.parent[x])
            return(self.parent[x])

    def same(self, x, y):
        x, y = x-1, y-1
        return(self.root(x) == self.root(y))

    def unite(self, x, y):
        x, y = x-1, y-1
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        else:
            self.parent[x] = y
            self.nums[y] += self.nums[x]
            self.nums[x] = 0
            return


N, M = map(int, input().split())
G = unionFind(N)
ans = [0]*M
ab = [tuple(map(int, input().split())) for i in range(M)]

tmp = (N * (N-1)) // 2
for i, x in enumerate(reversed(ab)):
    a, b = x[0], x[1]
    print(a, b)
    ans[M-1-i] = tmp
    a = G.root(a-1)
    b = G.root(b-1)
    if a == b:
        continue
    else:
        tmp -= G.nums[a] * G.nums[b]
        G.parent[a] = b
        G.nums[b] += G.nums[a]
        G.nums[a] = 0


for i in range(M):
    print(ans[i])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)


class unionFind:
    parent = []
    nums = []

    def __init__(self, n):
        self.parent = [i for i in range(n)]
        self.nums = [1]*n

    def root(self, x):
        if self.parent[x] == x:
            return(x)
        else:
            self.parent[x] = self.root(self.parent[x])
            return(self.parent[x])

    def same(self, x, y):
        x, y = x-1, y-1
        return(self.root(x) == self.root(y))

    def unite(self, x, y):
        x, y = x-1, y-1
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        else:
            self.parent[x] = y
            self.nums[y] += self.nums[x]
            self.nums[x] = 0
            return


N, M = map(int, input().split())
G = unionFind(N)
ans = [0]*M
ab = [tuple(map(int, input().split())) for i in range(M)]

tmp = (N * (N-1)) // 2
for i, x in enumerate(reversed(ab)):
    a, b = x[0], x[1]
    ans[M-1-i] = tmp
    a = G.root(a-1)
    b = G.root(b-1)
    if a == b:
        continue
    else:
        tmp -= G.nums[a] * G.nums[b]
        G.parent[a] = b
        G.nums[b] += G.nums[a]
        G.nums[a] = 0


for i in range(M):
    print(ans[i])
n, m = map(int, input().spilit())

if n > 8 or m > 8:
  print(':(')
else:
  print('Yay!')

### FIXED CODE ###

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

if n > 8 or m > 8:
  print(':(')
else:
  print('Yay!')
y,m,d = map(int,input().split(/))
if y<2019 or (y==2019 and m <= 4):
  print("Heisei")
else:
  print("TBD")

### FIXED CODE ###

y, m, d = map(str, input().split("/"))
if int(y) < 2019 or (int(y) == 2019 and int(m) < 5):
  print("Heisei")
else:
  print("TBD")
n = int(input())
word = []
for i in range(n):
	word.append(input())

if is_unique(word) == False:
	print("No")
	exit()

for i in range(1,len(word)):
	if word[i-1][-1] != word[i][-1]:
		print("No")
		exit()

print("Yes")

### FIXED CODE ###

n = int(input())
word = []
for i in range(n):
	word.append(input())

if len(word) != len(set(word)):
	print("No")
	exit()

for i in range(1,len(word)):
	if word[i-1][-1] != word[i][0]:
		print("No")
		exit()

print("Yes")
a, b = map(int, input().split(' '))
c = a * b
if C % 2 == 0:
  print(Odd)
else
  print(Even)

### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = a * b
if c % 2 != 0:
  print('Odd')
else:
  print('Even')
a,b,x = map(int,input().split())

half = a*a*b/2

from math import atan,pi
if x <= half:
    c = 2*x/a/b
    ans = atan(c/b)
else:
    c = 2*x/a/a - b
    ans = atan(a/(b-c))
print(90-ans*180/pi)

### FIXED CODE ###

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

half = a*a*b/2

from math import atan,pi
if x <= half:
    c = 2*x/a/b
    ans = atan(c/b)
else:
    c = 2*x/a/a - b
    if abs(b-c) < 10**(-7):
        ans = pi / 2
    else: ans = atan(a/(b-c))
print(90-ans*180/pi)