Harryxun/stf_run huggingface dataset:
import math

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

ans = "not coprime"

a, b = als[1], als[0]
if a < b:
    a,b = b,a
while a % b != 0:
    a, b = b, a % b
    if n == 2 and b == 1:
        ans = "pairwise coprime"
        failed = True

for i in range(2, n):
    a = als[i]
    if a < b:
        a,b = b,a 
    while a % b != 0:
        a, b = b, a % b
if b == 1:
    ans = "setwise coprime"
    break

existeven = False

failed = False

for i in range(n):
    if als[i] >= 2 and als[i]%2 == 0:
        if existeven:
            failed = True
            break
        else:
            existeven = True

maxa = max(als)

if not failed:
    for i in range(3, int(math.sqrt(maxa))+2, 2):
        existfactrial = False
        failed = False
        for j in range(n):
            if als[j] >= i and als[j]%i == 0:
                if existfactrial:
                    failed = True
                    break
                else:
                    existfactrial = True
        if failed:
            break
    if not failed:
        ans = "pairwise coprime"

print(ans)
        

    

### FIXED CODE ###

import math
from collections import deque

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

ans = "not coprime"

a, b = als[1], als[0]
if a < b:
    a,b = b,a
while a % b != 0:
    a, b = b, a % b
    if n == 2 and b == 1:
        ans = "pairwise coprime"
        failed = True

for i in range(2, n):
    a = als[i]
    if a < b:
        a,b = b,a 
    while a % b != 0:
        a, b = b, a % b
if b == 1:
    ans = "setwise coprime"
    # break

existeven = False

failed = False

for i in range(n):
    if als[i] >= 2 and als[i]%2 == 0:
        if existeven:
            failed = True
            break
        else:
            existeven = True

maxa = max(als)

afterchecklist = deque([])


if not failed:
    for i in range(3, int(math.sqrt(maxa))+2, 2):
        existfactrial = False
        failed = False
        for j in range(n):
            if als[j] >= i and als[j]%i == 0:
                afterchecklist.append(als[j]/i)
                if existfactrial:
                    failed = True
                    break
                else:
                    existfactrial = True
        if failed:
            break
    if not failed:
        for i in list(afterchecklist):
            existfactrial = False
            failed = False
            for j in range(n):
                if i != 1 and als[j] >= i and als[j]%i == 0:
                    if existfactrial:
                        failed = True
                        break
                    else:
                        existfactrial = True
            if failed:
                break
        if not failed:
            ans = "pairwise coprime"

print(ans)
import sys

sys.setrecursionlimit(1000000000000000000000000000000000)
s = [x for x in input()]
t = [x for x in input()]
dp = [['' for i in range(len(s))] for j in range(len(t))]
def dppp(ns,nt):
    global dp,s,t
    if ns == len(s) or nt == len(t):return ''
    if dp[nt][ns] != '':return dp[nt][ns]
    if s[ns] == t[nt]:
        get = s[ns] + dppp(ns+1,nt+1)
    else:
        get = ''
    sgo = dppp(ns+1,nt)
    tgo = dppp(ns,nt+1)
    if len(sgo) >= len(tgo) and len(sgo) >= len(get):
        dp[nt][ns] = sgo
        return sgo
    elif len(tgo) >= len(sgo) and len(tgo) >= len(get):
        dp[nt][ns] = tgo
        return tgo
    else:
        dp[nt][ns] = get
        return get
ans = dppp(0,0)
print(ans)

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
check = [0,abs(h[0]-h[1])] + [None]*(n-2)
for i in range(n-2):
    check[i+2] = min(check[i]+abs(h[i]-h[i+2]),check[i+1]+abs(h[i+1]-h[i+2]))
print(check[-1])
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
np = [i for i in range(1, n+1)]

import itertools

all_list = list(itertools.permutations(np))

cnt=0
for seq in all_list:
  cnt += 1
  if seq == p:
    a = cnt
  if seq == q:
    b = cnt

print(abs(a-b))

### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
np = [i for i in range(1, n+1)]

import itertools

all_list = list(itertools.permutations(np))

cnt=0
a, b = 0, 0
for seq in all_list:
  cnt += 1
  if list(seq) == p:
    a = cnt
  if list(seq) == q:
    b = cnt

print(abs(a-b))
import sys
n = int(input())
a = [int(n) for n in input().split()]
sum = [0]*n
sum[0] = a[0]
ans = 0
for i in range(1,n):
    sum[i] = sum[i-1]
    while((sum[i]+a[i])*sum[i-1] >= 0):
        if(sum[i-1] > 0):
            ans+=sum[i-1] + a[i]+1
            a[i]-=sum[i-1] + a[i]+1
        else:
            ans+=1 - sum[i-1] - a[i]
            a[i]+=1 - sum[i-1] - a[i]
        print(a)
    sum[i] += a[i]
print(ans)
# print(a)
# print(sum)


### FIXED CODE ###

import sys
N = int(input())
a = [int(_) for _ in input().split()]

#+,-,+,-
asum = [0]*(N)
ansp = 0
if(a[0] <= 0):
    ansp+=1-a[0]
    asum[0]=1
else:
    asum[0] = a[0]
for i in range(1,N):
    asum[i] = asum[i-1] + a[i]
    if(asum[i-1]*asum[i] >= 0):
        if(asum[i-1]>0):
            ansp+=1+asum[i]
            asum[i]=-1
        else:
            ansp+=1-asum[i]
            asum[i]=1
# print(asum)
# print(ansp)
#-,+,-,+,,,
ansn = 0
if(a[0] >= 0 ):
    ansn+=1+a[0]
    asum[0]=-1
else:
    asum[0] = a[0]
for i in range(1,N):
    asum[i] = asum[i-1] + a[i]
    if(asum[i-1]*asum[i] >= 0):
        if(asum[i-1]>0):
            ansn+=1+asum[i]
            asum[i]=-1
        else:
            ansn+=1-asum[i]
            asum[i]=1
# print(asum)
# print(ansn)
print(min(ansp,ansn))
n = int(raw_input())
a = n[0]*n[2]
b = n[0]*2 + n[2]*2
print'%d %d'%(a, b)

### FIXED CODE ###

a,b = map(int, raw_input().split())
c = a*b
d = 2*(a+b)
print'%d %d'%(c,d)
# coding:utf-8

x=map(int,(raw_input().split()))

if x[0] < x[1]) < x[2]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

# coding:utf-8

x=map(int,(raw_input().split()))

if x[0] < x[1] < x[2]:
    print("Yes")
else:
    print("No")
n = int(input())

if n < 1 or n > 10:
    raise ValueError

print(2 * n if n % 2 != 0 else n)


### FIXED CODE ###

n = int(input())

print(2 * n if n % 2 != 0 else n)
AB=[int(i) for i in input().split()]
nums=[1,2,3]
nums.remove(AB[0])
nums.remove(AB[1])
print(nums[0])

### FIXED CODE ###

A=int(input())
B=int(input())
nums=[1,2,3]
nums.remove(A)
nums.remove(B)
print(nums[0])
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(4):
    ls.append(int(input()))
ansls=[]
k = input(k)
for i in range(4):
    m = ls[i+1]-ls[0]
    ansls.append(m)

if max(ansls)>k:
    print(':(')
else:
    print('Yay!')

### FIXED CODE ###

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))
k = int(input())
if ls[4]-ls[0] <= k:
    print('Yay!')
else:
    print(':(')
s = input()
c = [0]*26
v = []
m = 0
for i in range(0, len(s)):
  c[(int)s[i]-'a'] += 1
for i in range(0, 26):
  m = max(m, c[i])
for i in range(0, 26):
  if c[i] == m:
    v.append((char)'a'+i)
a = 10000
for i in range(0, len(c)):
  n = 0
  t = 0
  for j in range(0, len(s)):
    if s[j] != v[i]:
      t += 1
    else:
      n = max(n, (t+1)//2)
  n = max(n, (t+1)//2)
  a = min(a, n)
print(a)

### FIXED CODE ###

s = input()
a = 10000
for i in range(0, 26):
  n = 0
  t = 0
  b = True
  for j in range(0, len(s)):
    if s[j] != chr(ord("a")+i):
      t += 1
    elif b:
      n = max(n, t)
      t = 0
    else:
      n = max(n, (t+1)//2)
      t = 0
  n = max(n, t)
  a = min(a, n)
print(a)
N, K = map(int, input().split())
h = [int(x) for x in input().split()]

INF = float('inf')
dp = [INF for _ in range(N+K+10)]

# initial state
dp[0] = 0

for i in range(N):
    for j in range(1, min(K+1, len(h)-i)):
        dp[i+j] = min(dp[i] + abs(h[j+i] - h[i]), dp[i+j])

print(dp[N-1])

### FIXED CODE ###

N = int(input())
h = [int(n) for n in input().split()]


cost = [0] * (N+1)

for i in range(N):
    if i == 0:
        cost[i] = 0
    elif i == 1:
        cost[i] = abs(h[i] - h[i-1])

    if i >= 2:
        cost[i] = min(cost[i-1] + abs(h[i] - h[i-1]), cost[i-2] + abs(h[i] - h[i-2]))

print(cost[N-1])
n,m=map(int,input().split())
ab = []
for _ in range(n):
  a,b=map(int,input().split())
  a,b=a-1,b-1
  ab.append({a,b})
import itertools

cnt = 0
for v in itertools.permutations(range(1,n)):
  l = 0
  ok = True
  for v2 in v:
    if {l,v2} not in ab:
      ok = False
      break
    l = v2
  if ok:
    print(v)
    cnt += 1
  
print(cnt)

### FIXED CODE ###

n,m=map(int,input().split())
ab = []
for _ in range(m):
  a,b=map(int,input().split())
  a,b=a-1,b-1
  ab.append({a,b})
import itertools

cnt = 0
for v in itertools.permutations(range(1,n)):
  l = 0
  ok = True
  for v2 in v:
    if {l,v2} not in ab:
      ok = False
      break
    l = v2
  if ok:
    #print(v)
    cnt += 1
  
print(cnt)
import heapq
n = int(f.readline())
cost = [[float('inf') for _ in range(n+1)] for _ in range(n+1)]
for _ in range(n-1):
    From, To, d = map(int, f.readline().split())
    cost[From][To] = d
    cost[To][From] = d

q, k = map(int, f.readline().split())
dist = [[float('inf') for _ in range(n+1)] for _ in range(n+1)]
used = [False]*(n+1)

for i in range(n+1):
    dist[i][i] = 0
        
def dijkstra(s, dist):
    next_v = [[0, s]]
    
    while len(next_v):
        v = next_v[0][1]
        for i in range(n+1):
            if dist[s][i] > dist[s][v] + cost[v][i]:
                dist[s][i] = dist[s][v] + cost[v][i]
                heapq.heappush(next_v, [dist[s][i], i])
        heapq.heappop(next_v)
        
    return dist
dist = dijkstra(k, dist)

for _ in range(q):
    x, y = map(int, f.readline().split())
    if used[x] == False:
        dist = dijkstra(x, dist)
        used[x] = True
    print(dist[x][k]+dist[k][y])

### FIXED CODE ###

import heapq
def dijkstra(n, edges, s):
    min_dist = [float('inf')] * n
    min_dist[s] = 0
    next_v = []
    heapq.heappush(next_v, (0, s))
    path = [-1] * n
    
    while True:
        if len(next_v) == 0: break
        d, v = heapq.heappop(next_v)
        
        for u, d in edges[v]:
            if min_dist[u] > min_dist[v] + d:
                min_dist[u] = min_dist[v] + d
                heapq.heappush(next_v, (min_dist[u], u))
                path[u] = v
                
    return min_dist, path

n = int(input())
edges = [[] for _ in range(n)]

for _ in range(n-1):
    a, b, c = map(int, input().split())
    edges[a-1].append((b-1, c))
    edges[b-1].append((a-1, c))


q, k = map(int, input().split())
dist, _ = dijkstra(n, edges, k-1)

for _ in range(q):
    x, y = map(int, input().split())
    print(dist[x-1] + dist[y-1])
# D 

from collections import deque
N=int(input())
A=list(map(int,input().split()))
A.sort()
B=deque(A)
#print(B)

cnt=0
tmp=[]
while B:
    i = B.popleft()
    for j in B:
        flag=True
        if j==i:
            flag=False
        elif j%i==0:
            pass
        else:
            tmp.append(j)
    else:
        if flag:
            cnt += 1
        #print(i,tmp,cnt)
        B=deque(tmp)
        tmp=[]
        continue

print(cnt)

### FIXED CODE ###

# D 

from collections import Counter
N=int(input())
A=list(map(int,input().split()))
A.sort()
maxi=A[-1]
real=set()
forbid=set()
#print(A[0],maxi)
d=dict(Counter(A))
#print(d)

cnt=0
for i in range(N):
    if A[i] not in forbid:
        if d[A[i]]==1:
            cnt +=1
        p=maxi//A[i]
        for j in range(1,p+1):
            forbid.add(j*A[i])
        
        
#print(forbid)
print(cnt)
5 4 1
1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000

### FIXED CODE ###

# %%

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

# %%
AA = [0] * (N + 1)
BB = [0] * (M + 1)
for i, v in enumerate(A):
    AA[i + 1] += v + AA[i]
for i, v in enumerate(B):
    BB[i + 1] += v + BB[i]

ans = 0
b_cnt = M
for a_cnt in range(N + 1):
    if AA[a_cnt] > K:
        continue
    while AA[a_cnt] + BB[b_cnt] > K:
        b_cnt -= 1

    ans = max(ans, a_cnt + b_cnt)

print(ans)
num, bricks, count, smash = int(input()), [int(x) for x in input().split("")], 1, 0
for x in bricks:
  if count == x: count += 1
  else: smash +=1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

### FIXED CODE ###

num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)
import sys
sys.setrecursionlimit(10**6)

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

mod = 10**9 + 7

p = [1] * (k - 1)  # {k-2}_P_{i} for i=0,1,...,k-2
for i in range(1, k - 1):
    p[i] = (p[i - 1] * (k - 1 - i)) % mod

g = [[] for _ in range(n + 1)]

for _ in range(n - 1):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)

used = [False] * (n + 1)


def dfs(t):
    if t == 1:
        used[0], used[1] = True, True
        num_children = len(g[1])
        if num_children + 1 > k:
            return 0
        else:
            ret = k * (k - 1) * p[num_children - 1]
            for c in g[t]:
                used[c] = True
                ret = (ret * dfs(c)) % mod
            return ret
    else:
        children = []
        for u in g[t]:
            if not used[u]:
                children.append(u)
                used[u] = True
        num_children = len(children)
        if num_children + 2 > k:
            return 0
        else:
            ret = p[num_children]
            for c in children:
                ret = (ret * dfs(c)) % mod

            return ret


print(dfs(1))


### FIXED CODE ###

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

sys.setrecursionlimit(100005)

n, k = na()
g = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = na()
    g[a - 1].append(b - 1)
    g[b - 1].append(a - 1)

mod = 10**9 + 7


def dfs(cur, par, k, g):
    ret = 1
    nc = 0 if par == -1 else 1
    for e in g[cur]:
        if e == par: continue
        nc += 1
        ret = ret * (k - nc) % mod
        ret = ret * dfs(e, cur, k, g) % mod
    return ret % mod


print(dfs(0, -1, k, g) * k % mod)
s = input()
sum_of_digits = sum(map(int, s))
if int(s) % sum_of_digts == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

x = input()
sum_of_digits = sum(map(int, x))
check = int(x) % sum_of_digits
print('No' if check else 'Yes')
n, x = map(int, input().split())
child_list = list(map(int, input().split()))

for x>0:
  if x - min(child_list) > 0:
    please_child +=1
    child_list = child_list.remove(min(child_list))
  if child_list == []:
    break
  if x - min(child_list) =< 0:
    break
print(please_child)

### FIXED CODE ###

N, x = map(int, input().split())
child_list = list(map(int, input().split()))

if len(child_list) == 1:
    if x > min(child_list):
        please_child = 0
    elif x == min(child_list):
        please_child = 1
elif len(child_list) > 1:
    nokori = x - min(child_list)
    please_child = 0 
    while nokori >=0:
        please_child +=1
        mini = min(child_list)
        child_list.remove(mini)
        if child_list == []:
            break
        if len(child_list) == 1:
            if nokori == min(child_list):
                please_child += 1
            if nokori > min(child_list):
                break
            else:
            	break
        else:    
            nokori -= min(child_list)
print(please_child)
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

Ai = 0
Bi = 0
t = 0
result = 0

while True:
    if Ai>=N:
        break
    elif t + A[Ai] <= K:
        t += A[Ai]
        Ai += 1
    else:
        break
result = Ai

while True:
    if Ai < 1 or Bi>=M:
        break
    if t + B[Ai] <= K:
        t += B[Bi]
        Bi += 1
        if Ai+Bi > result:
            result = Ai+Bi
    else:
        t -= A[Ai-1]
        Ai -= 1

print(result)

### FIXED CODE ###

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

Ai = 0
Bi = 0
t = 0
result = 0

while True:
    if Ai>=N:
        break
    elif t + A[Ai] <= K:
        t += A[Ai]
        Ai += 1
    else:
        break
result = Ai

while True:
    if Bi >=  M:
        break
    if t + B[Bi] <= K:
        t += B[Bi]
        Bi += 1
        if Ai+Bi > result:
            result = Ai+Bi
    else:
        if Ai < 1:
            break
        t -= A[Ai-1]
        Ai -= 1

print(result)
from math import atan, degrees
a, b, x = map(int, input().split())
if b*pow(a,2)/2 <= x:
    print(90-degrees(atan((a/2)/(b-x/pow(a,2)))))
else:
    print(90-degrees(atan((2*x/(a*b))/b)))

### FIXED CODE ###

from math import atan, degrees
a, b, x = map(int, input().split())
if pow(a,2)*b == x:
    print(0)
elif b*pow(a,2)/2 <= x:
    print(90-degrees(atan((a/2)/(b-x/pow(a,2)))))
else:
    print(90-degrees(atan((2*x/(a*b))/b)))
n=int(input())
a=sorted(list(map(int,input().split())))
c=[0]*8
k=-1
for i in range(n):
    if a[i]<400:
        c[0]=1
    elif a[i]<800:
        c[1]=1
    elif a[i]<1200:
        c[2]=1
    elif a[i]<1600:
        c[3]=1
    elif a[i]<2000:
        c[4]=1
    elif a[i]<2400:
        c[5]=1
    elif a[i]<2800:
        c[6]=1
    elif a[i]<3200:
        c[7]=1
    else:
        k=i
        break

d=0
for i in range(8):
    if c[i]==1:
        d+=1
if d==0:
    print(1, end=" ")
else:
    print(d, end=" ")

if k==-1:
    w
    print(d)
else:
    print(min(8,d+(n-k)))


### FIXED CODE ###

n=int(input())
a=sorted(list(map(int,input().split())))
c=[0]*8
k=-1
for i in range(n):
    if a[i]<400:
        c[0]=1
    elif a[i]<800:
        c[1]=1
    elif a[i]<1200:
        c[2]=1
    elif a[i]<1600:
        c[3]=1
    elif a[i]<2000:
        c[4]=1
    elif a[i]<2400:
        c[5]=1
    elif a[i]<2800:
        c[6]=1
    elif a[i]<3200:
        c[7]=1
    else:
        k=i
        break

d=0
for i in range(8):
    if c[i]==1:
        d+=1
if n==1 or d==0:
    print(1, end=" ")
else:
    print(d, end=" ")

if n==1:
    print(1)
elif k==-1:
    print(d)
else:
    print(d+(n-k))
// Rustで競技プログラミングの入力をスッキリ記述するマクロ
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

use std::collections::BinaryHeap;

fn main() {
  input! {
      n: usize,
      m: usize,
      a: [usize; n],
      bc: [(usize, usize); m]
  };
  let mut heap = BinaryHeap::new();
  for i in a.iter() {
      heap.push(*i);
  }
  for i in bc.iter() {
      let &(b, c) = i;
      for _ in 0..b {
          heap.push(c);
      }
  }
  let mut s = 0;
  for _ in 0..n {
      s += heap.pop().unwrap();
  }
  println!("{}", s);
}


### FIXED CODE ###

import heapq

n, m = map(int, input().split())
a = sorted([int(i) for i in input().split()])
heapq.heapify(a)
l = []

for _ in range(m):
    b, c = map(int, input().split())
    l.append((b, c))

l = sorted(l, key=lambda x: x[1], reverse=True)

for b, c in l:
    if a[0] >= c:
        break
    for _ in range(b):
        if a[0] < c:
            heapq.heappushpop(a, c)
        else:
            break

print(sum(a))
from copy import deepcopy
N, M = map(int, input().split())
graph = [[10000 for _ in range(N)] for l in range(N)]

for i in range(M):
  a, b, c = map(int, input().split())
  a -= 1
  b -= 1

  graph[b][a] = c
  graph[a][b] = c

newGraph = deepcopy(graph)

for k in range(N):
  for i in range(N):
    for j in range(N):
      graph[i][j] = min(graph[i][j], graph[i][k] + graph[k][j])

res = 0
for (i, row) in enumerate(newGraph):
  for (j, weight) in row:
    if (graph[i][j] != weight):
      res += 1

print(res/2)

### FIXED CODE ###

from copy import deepcopy
N, M = map(int, input().split())
INF = 10**9+7
graph = [[INF for _ in range(N)] for l in range(N)]

for i in range(M):
  a, b, c = map(int, input().split())
  a -= 1
  b -= 1

  graph[b][a] = c
  graph[a][b] = c

newGraph = deepcopy(graph)

for k in range(N):
  for i in range(N):
    for j in range(N):
      newGraph[i][j] = min(newGraph[i][j], newGraph[i][k] + newGraph[k][j])

res = 0
for (i, row) in enumerate(newGraph):
  for (j, weight) in enumerate(row):
    if graph[i][j] != weight and graph[i][j] != INF:
      res += 1
print(res//2)
n = int(input())
a = []
sosu = []

def sosuuhantei(x):
    p = x
    if p < 2:
        return false
    elif  n == 2:
        return p
    else:
        for i in range(3,math.floor(math.sqrt(x)) + 1,2):
            if x % i == 0:
                return False
        else:
             return x
            
            
sosulist = []
 
if n < 2:
    None
elif n == 2:
    sosulist.append(2)
else:
    sosulist.append(2)
    for i in range(3,55555+1,2):
        sosulist.append(sosuuhantei(i))
import random
print(random.choice(sosulist,k = 5))
    

### FIXED CODE ###

h, w = map(int,input().split())
pic = []

kabe_up_down = []
for i in range(w+2):
    kabe_up_down.append('.')
pic.append(kabe_up_down)

for i in range(h):
    onelist = ['.']
    inp = list(str(input()))
    for mm in range(len(inp)):
        onelist.append(inp[mm])
    onelist.append('.')
    pic.append(onelist)
    
pic.append(kabe_up_down)    


flag = 1
a = 'a'
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here =='#' and pic[i+1][j] == '#':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='#' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a
        elif here =='#' and pic[i-1][j] == '#':
            pic[i][j] = a
            pic[i-1][j] = a
        elif here =='#' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a    
            
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here == '#' and pic[i+1][j] == 'a':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='#' and pic[i][j+1] == 'a':
            pic[i][j] = a
            pic[i][j+1] = a
        elif here =='#' and pic[i-1][j] == 'a':
            pic[i][j] = a
            pic[i-1][j] = a
        elif here =='#' and pic[i][j+1] == 'a':
            pic[i][j] = a
            pic[i][j+1] = a    
        
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here == a and pic[i+1][j] == '#':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='a' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a
        elif here =='a' and pic[i-1][j] == '#':
            pic[i][j] = a
            pic[i-1][j] = a
        elif here =='a' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a            
            
for i in range(1,h+1):
    for j in range(1,w+1):
        if pic[i][j] == '#':
            flag = 0
            

if flag == 0:
    print('No')
else:
    print('Yes')
4
RRBR

### FIXED CODE ###

n = int(input())
s = input()
a = s.count('R')
if a > n-a:
    print('Yes')
else:
    print('No')