Harryxun/stf_run huggingface dataset:
from collections import defaultdict
import sys
from fractions import Fraction

count = defaultdict(int)
N = int(sys.stdin.readline())

edges = defaultdict(list)
for i in range(N):
    A, B = [int(x) for x in sys.stdin.readline().split()]
    if B == 0:
        angle = "I"
    else:
        angle = Fraction(A, B)
    count[angle] += 1

ZERO = Fraction(0, 1)
pairs = {}
solos = []
for k1 in count:
    if k1 in pairs:
        continue
    if k1 == "I":
        if ZERO in count:
            pairs[ZERO] = k1
        continue

    k2 = -1 / k1
    if k2 in count:
        pairs[k2] = k1
    else:
        solos.append(k1)
# print(pairs, solos)

P = 1000000007


def pow2(n):
    if n < 30:
        return 2 ** n

    p = pow2(n // 2)
    pp = (p * p) % P
    if n % 2 == 1:
        return (2 * pp) % P
    else:
        return pp


result = 1
for p in pairs:
    # print("pair", p, count[p], pairs[p], count[pairs[p]])
    n = count[p]
    m = count[pairs[p]]
    result = result * ((pow2(n) - 1) + (pow2(m) - 1) + 1) % P
for k in solos:
    # print("solo", k, count[k])
    result = result * pow2(count[k]) % P

print(result - 1)


### FIXED CODE ###

from collections import defaultdict
import sys
from math import gcd
count = defaultdict(int)
N = int(sys.stdin.readline())

zeros = 0
for i in range(N):
    A, B = [int(x) for x in input().split()]
    if A == B == 0:
        zeros += 1
        continue
    if A == 0:
        angle = (0, 1)
    elif B == 0:
        angle = (1, 0)
    else:
        sgn = A // abs(A)
        g = gcd(A, B)
        angle = (A // sgn // g, B // sgn // g)

    count[angle] += 1
# print(count)

pairs = {}
solos = []
for k1 in count:
    if k1 in pairs:
        continue
    if k1 == (0, 1):
        if (1, 0) in count:
            pairs[(1, 0)] = k1
        else:
            solos.append(k1)
        continue

    A, B = k1
    if B:
        sgn = -B // abs(B)
        k2 = (-B // sgn, A // sgn)
    else:
        k2 = (0, 1)
    if k2 in count:
        pairs[k2] = k1
    else:
        solos.append(k1)
#print(pairs, solos)

P = 1000000007


def pow2(n):
    # if n < 30:
    #     return 2 ** n

    # p = pow2(n // 2)
    # pp = (p * p) % P
    # if n % 2 == 1:
    #     return (2 * pp) % P
    # else:
    #     return pp
    return pow(2, n, P)


result = 1
for p in pairs:
    # print("pair", p, count[p], pairs[p], count[pairs[p]])
    n = count[p]
    m = count[pairs[p]]
    result = result * ((pow2(n) - 1) + (pow2(m) - 1) + 1) % P
for k in solos:
    # print("solo", k, count[k])
    result = result * pow2(count[k]) % P

print((result + zeros - 1) % P)
a,b,c=map(int,input().split())
print((a[0]+b[0]+c[0]).upper())

### FIXED CODE ###

a,b,c=input().split()
print((a[0]+b[0]+c[0]).upper())
"""
author : halo2halo
date : 23, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
lis = list(S)
# print(lis)
if lis[0] == 'A' and 2 <= lis.index('C') <= len(lis) - 1:
    st = ''.join(lis[1:lis.index('C')] + lis[lis.index('C') + 1:])
    # print(st)
    if st.lower():
        print('AC')
    else:
        print('WA')

else:
    print('WA')


### FIXED CODE ###

"""
author : halo2halo
date : 23, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = list(readline().decode('utf8').rstrip())
bl = S[0] == 'A'
bl &= ('C' in S[2:-1])

if bl:
    S.remove('A')
    S.remove('C')

bl &= all('a' <= x <= 'z' for x in S)

print('AC' if bl else 'WA')
n=int(input())
ans=0
for i in range(n):
    x,u=int(input().split())
    if u="BTC":
        ans+=380000*x
    else:
        ans+=x
print(ans)

### FIXED CODE ###

n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u=="BTC":
        ans+=380000*float(x)
    else:
        ans+=int(x)
print(ans)
n=input (int()) 
x=0
if n%2==0:
    x=(n/2)*((n/2)+1)
else:
    x=((n//2)+1)**2
print(x)

### FIXED CODE ###

n=int(input())
e=int(n/2)
if n%2:
	o=int(n/2+1)
else:
	o=int(n/2)
	
print (o*e)
allsets = []
n,t = list(map(int,input().split()))
for _ in range(t):
    a,b = list(map(int,input().split()))
    if a < b and [a,b] not in allsets:
        allsets.append([a,b])
    elif b < a and [b,a] not in allsets:
        allsets.append([b,a])
# print(allsets)
hmap = {}
visitedNode = {}
for a,b in allsets:
    if a in visitedNode:
        if b not in hmap[visitedNode[a]]:
            hmap[visitedNode[a]].append(b)
        del visitedNode[a]
        continue
    if a in hmap:
        hmap[a].append(b)
        visitedNode[b] = a
    else:
        hmap[a] = [b]
        visitedNode[b] = a
# print(hmap)
res = 0
for k,v in hmap.items():
    res = max(res,len(v)+1)
print(res)


### FIXED CODE ###

d,t,s = list(map(int,input().split()))
res = d/s
print("Yes" if res <= t else "No")
def solve():
    S = raw_input()
    T = raw_input()
 
    if len(S) == len(T):
        for j in range(len(T)):
            if T[j] != S[j] and S[j] != "?":
                print "UNRESTORABLE"
                return 0
            else:
                pass
        print T
        return 0
 
    if len(S) < len(T):
        print "UNRESTORABLE"
        return 0
 
    for i in range(len(S) - len(T)):
        flag = True
        for j in range(len(T)):
            if T[j] != S[len(S)-1-i-len(T):len(S)-1-i][j] and S[len(S)-1-i-len(T):len(S)-1-i][j] != "?":
                flag = False
 
        if flag:
            S = S[0:len(S)-1-i-len(T)] + T + S[len(S)-1-i:len(S)+1]
            print S.replace("?", "a")
            return 0
 
    print "UNRESTORABLE"
    return 0
solve()
def solve():
    S = raw_input()
    T = raw_input()

    if len(S) == len(T):
        for j in range(len(T)):
            if T[j] != S[j] and S[j] != "?":
                print "UNRESTORABLE"
                return 0
            else:
                pass
        print T
        return 0

    if len(S) < len(T):
        print "UNRESTORABLE"
        return 0

    for i in range(len(S) - len(T) + 1):
        flag = True
        for j in range(len(T)):
            if T[j] != S[len(S)-1-i-len(T):len(S)-1-i][j] and S[len(S)-1-i-len(T):len(S)-1-i][j] != "?":
                flag = False

        if flag:
            S = S[0:len(S)-1-i-len(T)] + T + S[len(S)-1-i:len(S)+1]
            print S.replace("?", "a")
            return 0

    print "UNRESTORABLE"
    return 0
solve()


### FIXED CODE ###

S = raw_input()
T = raw_input()
 
if len(S) < len(T):
  print 'UNRESTORABLE'
  exit()

answers = []

for i in xrange(len(S) - len(T) + 1):
    for j in xrange(len(T)):
        flag = True
        if S[i+j] != '?' and S[i+j] != T[j]:
            flag = False
            break
    if flag:
        answers.append((S[:i] + T + S[i+len(T):]).replace("?", "a"))

if len(answers) == 0:
    print 'UNRESTORABLE'
    exit()

answers.sort()
print answers[0]
A,B,X=map(int,input().split())
N=0
while A*N+B*len(str(N))<X:
    N+=10000
    
N-=10000
while A*N+B*len(str(N))<X:
    N+=1000

N-=1000
while A*N+B*len(str(N))<X:
    N+=100

N-=100
while A*N+B*len(str(N))<X:
    N+=10

N=N-10
while A*N+B*len(str(N))<X:
    N+=1
print(N-1)

### FIXED CODE ###

S=input()
week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-week.index(S))
print(input()[0]+input()[0]+input()[0])

### FIXED CODE ###

print('A{}C'.format(input().split()[1][0]))
s = input()
n = len(s)
t = s[:n // 2]
k = s[-n//2+1:]
if s == s[::-1] and t == t[::-1]:
    print('Yes')
else:
    print('No')
s = input()
n = len(s)
t = s[:n // 2]
k = s[-n//2+1:]
if s == s[::-1] and t == t[::-1]:
    print('Yes')
else:
    print('No')
提出情報

### FIXED CODE ###

s = input()
n = len(s)
t = s[:n // 2]
k = s[-n//2+1:]
if s == s[::-1] and t == t[::-1]:
    print('Yes')
else:
    print('No')
N = input()
N = int(N)
s = [[ int(i) for i in input().split()] for i in range(N)]
hoge = []
import collections

for i in s:
    for k in s:
        if k != i:
            hoge1 = (i[0] - k[0],i[1] - k[1])
            if hoge1[0] < 0:
                hoge1 = hoge1 * -1
            hoge.append(hoge1)

c = collections.Counter(hoge)
print(N - c.most_common()[0][1] // 2)

### FIXED CODE ###

N = input()
N = int(N)
s = [[ int(i) for i in input().split()] for i in range(N)]
hoge = []
import collections

for i in s:
    for k in s:
        if k != i:
            hoge1 = (i[0] - k[0],i[1] - k[1])
            if hoge1[0] <= 0:
                hoge1 = (k[0] - i[0],k[1] - i[1])
            if hoge1[0] == 0 and hoge1[1] <= 0:
                hoge1 = (k[0] - i[0],i[1] - k[1])
            hoge.append(hoge1)
if len(hoge) >= 1:
	c = collections.Counter(hoge)
	print(N - c.most_common()[0][1] // 2)
else:
    print(1)
# -*- coding: utf-8 -*-
from collections import defaultdict

N = int(input())
S = input()
A, B = S[:N], S[N:]
D = defaultdict(int)
ans = 0

def paint(X, i):
    r = ""
    b = ""
    for j, k in enumerate(format(i, "b").zfill(N)):
        if k == "1":
            r += X[j]
        else:
            b += X[j]
    return r, b

for i in range(2**N):
    r, b = paint(A, i)
    D[(r, b)] += 1

for i in range(2**N):
    r, b = paint(B, i)
    ans += D[(b[::-1], r[::-1])]

print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())
N = int(input())
A = list(inpl()) + [0]

i = 1
ans = 0
while i < N:
    if A[i-1] == A[i]:
        ans += 1
        i += 1
    i += 1
print(ans)
using namespace std;

#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <limits>
#include <climits>
#include <vector>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <numeric>
typedef long long ll;
typedef pair<int,int> p;

int main()
{
  long double n;
  cin >> n;
  while (true)
  {
    if (pow(n,0.5) == floor(pow(n,0.5)))
    {
      cout << n << endl;
      return 0;
    }
    n--;
  }

}


### FIXED CODE ###

import math
n = int(input())
while True:
  if math.sqrt(n) == math.floor(math.sqrt(n)):
    print(n)
    break
    
  n -= 1
if a > b:
    tmp = a
    a = b
    b = tmp
if b > c:
    tmp = b
    b = c
    c = tmp
if a > b:
    tmp = a
    a = b
    b = tmp

pritn(a, b, c)

### FIXED CODE ###

nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
 
if a > b:
    tmp = a
    a = b
    b = tmp
if b > c:
    tmp = b
    b = c
    c = tmp
if a > b:
    tmp = a
    a = b
    b = tmp
 
print(a, b, c)
import numpy as np
s = np.array(list(map(lambda x: -1 if x == '?' else int(x), input())))

def test(c):
    # current point can be seen as xth smallest val, where x can be any value in [a, b] (subset of [0, c])
    # a <= b
    a, b = 0, c
    ok = True
    discrete = False # when True x = a, a+2, ..., b-2, b
    for si in s:
        if si == 1:
            if a == b == c:
                return False
            a += 1
            b += 1
            if b > c:
                b = c - 1 if discrete else c
        elif si == 0:
            if a == b == 0:
                return False
            a -= 1
            b -= 1
            if a < 0:
                a = 1 if discrete else 0
        else:
            if a == b == 0:
                a = b = 1
            elif a == b == c:
                a = b = c - 1
            elif a == b:
                discrete = True
                a -= 1
                b += 1
            else:
                a -= 1
                b += 1
                if a < 0:
                    a = 1 if discrete else 0
                if b > c:
                    b = c - 1 if discrete else c
    return True

l, r = 0, s.size
while r - l > 1:
    c = (l + r) // 2
    if test(c):
        r = c
    else:
        l = c
print(r)


### FIXED CODE ###

from numba import njit
import numpy as np
s = np.array(list(map(lambda x: -1 if x == '?' else int(x), input())))
@njit
def test(c):
    # current point can be seen as xth smallest val, where x can be any value in [a, b] (subset of [0, c])
    # a <= b
    a, b = 0, c
    ok = True
    discrete = False # when True x = a, a+2, ..., b-2, b
    for si in s:
        if si == 1:
            if a == b == c:
                return False
            a += 1
            b += 1
            if b > c:
                b = c - 1 if discrete else c
        elif si == 0:
            if a == b == 0:
                return False
            a -= 1
            b -= 1
            if a < 0:
                a = 1 if discrete else 0
        else:
            if a == b == 0:
                a = b = 1
            elif a == b == c:
                a = b = c - 1
            elif a == b:
                discrete = True
                a -= 1
                b += 1
            else:
                a -= 1
                b += 1
                if a < 0:
                    a = 1 if discrete else 0
                if b > c:
                    b = c - 1 if discrete else c
    return True

l, r = 0, s.size
while r - l > 1:
    c = (l + r) // 2
    if test(c):
        r = c
    else:
        l = c
print(r)
import math
 
def dcos(x):
    return math.cos(math.radians(x))
 
A, B, H, M = map(int, input().split())
 
one_H = 360 / 12
one_M = 360 / 60
one_H_M = one_H / 60
 
#短針の動きのみ考える。
kakudo_H = one_H * H
#分針の動きを加える。
kakudo_H = kakudo_H + one_H_M*M
 
if kakudo_H > 180:
    kakudo_H = 360 - kakudo_H
 
kakudo_M = one_M * M
if kakudo_M > 180:
    kakudo_M = 360 - kakudo_M
 
kakudo = abs(kakudo_M - kakudo_H)
 
ans = A**2 + B**2 + (-2)*A*B*dcos(kakudo)

assert kakudo > 0
 
print(ans**0.5)


### FIXED CODE ###

import math

a, b, h, m = list(map(int, input().split()))
deg_a = (60 * h + m) * (360 / (60 * 12))
deg_b = m * (360 / 60)
deg = abs(deg_a - deg_b)
rad = math.radians(deg)

c2 = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
print(c2 ** 0.5)
A,B = map(int, input().split())
ans = []

taxfree = A/0.08
while taxfree*0.08 < A+1:
    if B <= taxfree*0.1 < B+1:
        ans.append(int(taxfree))
        break
    taxfree += 1

taxfree = B/0.1
while taxfree*0.1 < B+1:
    if B <= taxfree*0.08 < A+1:
        ans.append(int(taxfree))
        break
    taxfree += 1

if len(ans) != 0:
    print(min(ans))
else:
    print(-1)

### FIXED CODE ###

S = input()

if all(i == "A" for i in S) or all(i == "B" for i in S):
    print("No")
else:
    print("Yes")
import itertools
import bisect
N, M, K = map(int,input().split())
A = list(map(int, input().split())) 
B = list(map(int, input().split())) 

A_ = list(itertools.accumulate(A))
B_ = list(itertools.accumulate(B))


l = len(A_)
ans = max(ans, bisect.bisect_right(B_, K))
for idx, i in enumerate(A_):
  if i <= K:
          ans = max(idx+1 + bisect.bisect_right(B_, K-i), ans)
  
print(ans)

### FIXED CODE ###

import itertools
import bisect
N, M, K = map(int,input().split())
A = list(map(int, input().split())) 
B = list(map(int, input().split())) 

A_ = list(itertools.accumulate(A))
B_ = list(itertools.accumulate(B))

ans = 0
l = len(A_)
ans = max(ans, bisect.bisect_right(B_, K))
for idx, i in enumerate(A_):
  if i <= K:
          ans = max(idx+1 + bisect.bisect_right(B_, K-i), ans)
  
print(ans)
N,K=map(int,input().split())
sum1=0
for k in range(K,N+2,1):
    sum1+=(N-k+1)*k+1
print(sum1%(10**9+7))

### FIXED CODE ###

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

buka=[0]*N
for i in A:
    buka[i-1]=buka[i-1]+1
for i in range(N):
    print(buka[i])
s = input()
s = list(s)
s.sort()
if s[0] == s[1] && s[2] == s[3]:
  print("Yes")
else :
  print("No")  

### FIXED CODE ###

s = input()
s = list(s)
s.sort()
if s[0] == s[1] and s[2] == s[3] and s[1] != s[3]:
  print("Yes")
else :
  print("No")
def main():
    N  = int(input()) 
    A=list(map(int, input().split()))
    B = list(set(A))
    _ ,s = sieve(10**6+5)
    B.sort(reverse=True)
    cnt = 0

    if A.count(1)>1:
        print(0)
        return
    elif A.count(1)==1:
        print(1)
        return


    for i in range(len(B)):
        if A.count(B[i])>1:
            continue
        if s[B[i]]==False:
            cnt += 1
            continue

        Flag = True
        for j in range(i+1,len(B)):
            if B[i] % B[j] == 0:
                Flag = False
                break
        if Flag:
            cnt += 1
    
    print(cnt)


def sieve(n):
    is_prime = [True for _ in range(n+1)]
    is_prime[0] = False

    for i in range(2, n+1):
        if is_prime[i-1]:
            j = 2 * i
            while j <= n:
                is_prime[j-1] = False
                j += i
    table = [ i for i in range(1, n+1) if is_prime[i-1]]
    return is_prime, table



if __name__ == '__main__':
    main()

### FIXED CODE ###

import collections

def main():
    N  = int(input()) 
    A=list(map(int, input().split()))
    C = collections.Counter(A)
    B = list(set(A))
    B.sort()
    lenb = len(B)
    Boo = [True]*lenb
    ZENBU = [False]*(10**6+4)

    if C[1]>1:
        print(0)
        return
    if C[1]==1:
        print(1)
        return

    for i in range(lenb):
        temp = 2
        if ZENBU[B[i]]==False:
            while B[i]*temp < 1000002:
                ZENBU[B[i]*temp] = True
                temp+=1

    cnt = 0
    for i in range(lenb):
        if ZENBU[B[i]]==False and C[B[i]]==1:
            cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()
H,W=map(int,input().split())
h,w=map(int,input().split())
X=(H-h)*(W-w)
print(x)

### FIXED CODE ###

H,W=map(int,input().split())
h,w=map(int,input().split())
X=(H-h)*(W-w)
print(X)
# -*- coding:utf-8 -*-

a,b = map(int, input().split())
sum = a * b
if sum % 2 == 0:
        print("Odd")
else:
        print("Even")
~

### FIXED CODE ###

# -*- coding:utf-8 -*-
a,b = map(int, input().split())
if a * b % 2 != 0:
        print("Odd")
else:
        print("Even")
n=int(input());d=[0]*(n+1);l=[int(input()) for i in range(n)];a=1;b=-1
for i in range(n):
    c=l[i]
    if b!=c:
        a+=d[c]
        d[c]=a
    b=c
print(a%(10**9+9))

### FIXED CODE ###

n=int(input());d=[0]*200001;a=1;b=0
for i in range(n):
    c=int(input())
    if b!=c:
        a+=d[c]
        d[c]=a
    b=c
print(a%(10**9+7))
N,M = list(map(int,input().split()))
colect_quest = [0]*N
WA_quest = [0]*N
for i in range(M):
    pi,si = list(map(str,input().split()))
    pi = int(pi)
    if si == "AC":
        colect_quest[pi] = 1
    if si == "WA" and colect_quest[pi] != 1:
        WA_quest[pi] += 1
    
print(sum(colect_quest),sum(WA_quest))

### FIXED CODE ###

N,M = list(map(int,input().split()))
colect_quest = [0]*N
WA_quest = [0]*N
for i in range(M):
    pi,si = list(map(str,input().split()))
    pi = int(pi)
    if si == "AC":
        colect_quest[pi-1] = 1
    if si == "WA" and colect_quest[pi-1] != 1:
        WA_quest[pi-1] += 1
WA_count = 0
for i in range(len(WA_quest)):
    if colect_quest[i] == 1 :
        WA_count += WA_quest[i] 
print(sum(colect_quest),WA_count)
n=input()
if n[0]=="7" or n[1]=="7" or n[2]=="7"
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n=input()
if n[0]=="7" or n[1]=="7" or n[2]=="7":
    print("Yes")
else:
    print("No")
N=int(input())
ld=list(map(int,input().split()))
if ld[0]!=0:
    print(0)
else:
    dd={}
    for i in range(N):
        if ld[i] in dd:
            dd[ld[i]]+=1
        else:
            dd[ld[i]]=1
    if dd[0]!=1:
        print(0)
    else:
        DV=998244353
        ans=1
        for i in range(0,len(dd)-1):
            ans*=dd[i]**dd[i+1]
            ans%=DV
        print(ans)


### FIXED CODE ###

N=int(input())
ld=list(map(int,input().split()))
def modpow(a,n,p):#a^n mod p
    res=1
    while n>0:
        if n&1:#１とのビット論理積が１、つまり奇数
            res=res*a%p
        a=a*a%p
        n>>=1
        #ビットの右シフト_2進数表記のnを小数点を固定して右に１桁ずらす_１桁小さくなる
    return res
if ld[0]!=0:
    print(0)

else:
    dd={}
    for i in range(N):
        if ld[i] in dd:
            dd[ld[i]]+=1
        else:
            dd[ld[i]]=1

    if dd[0]!=1:
        print(0)
    else:
        DV=998244353
        ans=1
        for i in range(0,len(dd)-1):
            #mul=dd[i]**dd[i+1]%DV
            if i in dd and i+1 in dd:
                mul=modpow(dd[i],dd[i+1],DV)
                #ans*=dd[i]**dd[i+1]
                ans*=mul
                ans%=DV
            else:
                print(0)
                break
        else:
            print(ans)
n = int(input())
arr = [int(j) for j in input().split()]
count = 0
for i in range(1, n+1):
  if i%2 == 1 && arr[i-1]%2 == 1:
    count += 1
print(count)

### FIXED CODE ###

n = int(input())
arr = [int(j) for j in input().split()]
count = 0
for i in range(1, n+1):
  if i%2 == 1 and arr[i-1]%2 == 1:
    count += 1
print(count)
a,X,c=map(int,input().split())

S='A'+X[0]+'C'

print(S)

### FIXED CODE ###

s = input().split()

b = s[1]

S='A'+b[0]+'C'

print(S)
N, Q = map(int, input().split())
S = input()
c = [0]*N
for i in range(1, N):
    c[i] = c[i-1]
    if S[i-1]=="A" and S[i]=="C":
        c[i] = c[i-1] + 1
for l,r in lr:
    print(c[r-1]-c[l-1])

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
c = [0]*N
for i in range(1, N):
    c[i] = c[i-1]
    if S[i-1]=="A" and S[i]=="C":
        c[i] = c[i-1] + 1
for _ in range(Q):
    l, r = map(int, input().split())
    print(c[r-1]-c[l-1])
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    primt('Sunny')

### FIXED CODE ###

s=input()
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')
N = int(input())
src = [tuple(map(lambda x:int(x)-1,input().split())) for i in range(N-1)]
es = [[] for i in range(N)]
for a,b in src:
    es[a].append(b)
    es[b].append(a)

if all(len(e)<=2 for e in es):
    print('First' if N%2 else 'Second')
    exit()
assert False

### FIXED CODE ###

N = int(input())
src = [tuple(map(lambda x:int(x)-1,input().split())) for i in range(N-1)]
es = [[] for i in range(N)]
for a,b in src:
    es[a].append(b)
    es[b].append(a)

def farthest_node_and_dist(s):
    dist = [N]*N
    dist[s] = 0
    stack = [s]
    ret_node = -1
    ret_dist = 0
    while stack:
        v = stack.pop()
        d = dist[v]
        for to in es[v]:
            if d+1 < dist[to]:
                dist[to] = d+1
                stack.append(to)
                if ret_dist < d+1:
                    ret_dist = d+1
                    ret_node = to
    return (ret_node, ret_dist)

n,d = farthest_node_and_dist(0)
n,d = farthest_node_and_dist(n)
print('Second' if d%3==1 else 'First')
def solve():
    n = int(input())
    al = [int(i) for i in input().split()]
    memos = [0]*n
    for i in range(n):
        memos[i] = i - (al[i] - 1)
    # print(memos)
    ans = 0
    for idx in range(n):
        if memos[idx] == 0:
            memos[idx+1], memos[idx] = memos[idx+1]-1, memos[idx]+1
            ans += 1
        # print(memos)
    print(ans)

if __name__=="__main__":
    solve()

### FIXED CODE ###

def solve():
    n = int(input())
    al = [int(i) for i in input().split()]
    memos = [0]*n
    for i in range(n):
        memos[i] = i - (al[i] - 1)
    # print(memos)
    ans = 0
    for idx in range(n):
        if memos[idx] == 0:
            if idx != n - 1:
                memos[idx+1], memos[idx] = memos[idx+1]-1, memos[idx]+1
            else:
                memos[idx], memos[idx-1] = memos[idx-1]+1, memos[idx]-1
            ans += 1
        # print(memos)
    print(ans)

if __name__=="__main__":
    solve()
temp = input().split(" ")
N = int(temp[0])
M = int(temp[1])
H = input().split(" ")
good = [1] * N
for i in range(M):
    root = input().split(" ")
    a = int(root[0])-1
    b = int(root[1])-1
    if H[a]=>H[b]:
        good[b] = 0
    if H[a]<H[b]:
        good[a] = 0

print(sum(good))

### FIXED CODE ###

temp = input().split(" ")
N = int(temp[0])
M = int(temp[1])
H = input().split(" ")
good = [1] * N
for i in range(M):
    root = input().split(" ")
    a = int(root[0])-1
    b = int(root[1])-1
    if int(H[a])>=int(H[b]):
        good[b] = 0
    if int(H[a])<=int(H[b]):
        good[a] = 0
print(sum(good))
print("Yes" if sorted(input())<sorted(input(),reversed=True) else "No")

### FIXED CODE ###

s=sorted(input())
t=sorted(input(),reverse=True)
if s<t:
  print("Yes")
else:
  print("No")