Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
import itertools

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

def primes(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  # supposing you want multiple factors repeated
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac


mod = M % N
div = M // N
if mod == 0:
    print(M//N)
    exit()

f = primes(M)

# 素数の場合などは１
if len(f) <= 1:
    print(1)
    exit()

ans_list = []
for i in range(1,len(f)):
    set1 = set([tuple(sorted(l)) forl in list(itertools.combinations(f, i))])
    for com in set1:
        tmp = 1
        for c in com:
            tmp *= c
        if tmp >= N:
            ans_list.append(M//tmp)

if len(ans_list) == 0:
    print(1)
else:
    print(max(ans_list))


### FIXED CODE ###

# -*- coding: utf-8 -*-
import itertools
from collections import Counter

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

def primes(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  # supposing you want multiple factors repeated
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac


mod = M % N
div = M // N
if mod == 0:
    print(M//N)
    exit()

f = primes(M)

# 素数の場合などは１
if len(f) == 1:
    print(1)
    exit()

cnt = Counter(f)
ans_list = []

tmp_list = []
for k,v in cnt.items():
  tmp_list.append([i for i in range(v+1)])

# print(cnt)
# print(list(itertools.product(*tmp_list)))
for p in itertools.product(*tmp_list):
    tmp = 1
    for k,i in zip(cnt.keys(),p):
        tmp = tmp * (k ** i)

    if tmp > N:
        ans_list.append(M//tmp)

if len(ans_list) == 0:
    print(1)
else:
    print(max(ans_list))
A, op, B = str(input())
A = int(A)
B = int(B)
op = str("+", "-")
if op =="+":
    print(A+B)
elif op == "-":
    print(A-B)


### FIXED CODE ###

A, op, B = input().split()

if op =="+":
    print(int(A) + int(B))
elif op == "-":
    print(int(A) - int(B))
A, B, K = map(int, input().split())
list = [i for i in range(A, A+K)]
list.append(i for i in range(B+1-K, B+1))
list = sorted(set(list))
for i in list: 
    if A<=i<=B:
        print(i)

### FIXED CODE ###

A, B, K = map(int, input().split())
list = [i for i in range(A, A+K)]
list.extend(i for i in range(B+1-K, B+1))
list = sorted(set(list))
for i in list:
    if A<=i<=B:
        print(i)
import fractions
from functools import reduce
N = int(input())
A = list(map(int, input().split()))
def func(x,y):
    return (x*y)//fractions.gcd(x,y)
AB = reduce(func, A, 1)
sumB = 0
for ii in range(N):
    sumB += AB/A[ii]
print(sumB%(10**9+7))

### FIXED CODE ###

import fractions
N = int(input())
A = list(map(int, input().split()))
AB = 1
for i in A:
    AB = AB*i//fractions.gcd(AB,i)
sumB = 0
for i in A:
    sumB += AB//i
print(int(sumB%(10**9+7)))
K = int(input())
S = 7

    for i in range(K+1):
        if int(S) % K != 0:
            S = S * 10 + 7
        else:
            print(i+1)
            break

    if i >= K:
        print('-1')


### FIXED CODE ###

K = int(input())
if K % 2 == 0:
    print(-1)
elif K % 5 == 0:
    print(-1)
else:
    S = 7
    for i in range(K+1):
        if S % K == 0:
            print(i+1)
            break
        else:
            S = S % K
            S = S * 10 + 7
    else:
        print(-1)
n = int(input())
l = 0
r = n-1
mid = (l+r)/2
print(l)
s1 = raw_input()
if s1 == 'Vacant':
    exit(0)
print(mid)
s2 = raw_input()
if s2 == 'Vacant':
    exit(0)
while True:
    print("before:",l,r)
    if (mid-l) % 2 == int(s1 != s2):
        l = mid
        s1 = s2
    else:
        r = mid
    print("after:",l,r)
    mid = (l+r)/2
    if mid == l:
        break
    print(mid)
    s2 = raw_input()
    if s2 == 'Vacant':
        break
print(mid+1)
s1 = raw_input()


### FIXED CODE ###

n = int(input())
l = 0
r = n-1
mid = (l+r)/2
print(l)
s1 = raw_input()
if s1 == 'Vacant':
    exit(0)
print(mid)
s2 = raw_input()
if s2 == 'Vacant':
    exit(0)
while True:
    #print("before:",l,r)
    if (mid-l) % 2 == int(s1 != s2):
        l = mid
        s1 = s2
    else:
        r = mid
    #print("after:",l,r)
    mid = (l+r)/2
    if mid == l:
        break
    print(mid)
    s2 = raw_input()
    if s2 == 'Vacant':
        exit(0)
print(mid+1)
s1 = raw_input()
n, m = map(int, input().split())

abs = [list(map(int, input().split())) for _ in range(n)]
cds = [list(map(int, input().split())) for _ in range(m)]

for a, b in abs:
  min_distance = float("inf")
  min_checkpoint = 0
  for i, cd in enumerate(cds):
    c, d = cd
    if abs(c - a) + abs(d - b) < min_checkpoint:
      min_checkpoint = i + 1
  print(min_checkpoint)

### FIXED CODE ###

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

students = [list(map(int, input().split())) for _ in range(n)]
checkpoints = [list(map(int, input().split())) for _ in range(m)]

for a, b in students:
    min_distance = float("inf")
    min_checkpoint = 0
    for i, cd in enumerate(checkpoints):
        c, d = cd
        if abs(c - a) + abs(d - b) < min_distance:
            min_checkpoint = i + 1
            min_distance = abs(c - a) + abs(d - b)
    print(min_checkpoint)
from collections import Counter


def main():
    n = int(input())
    aa = list(map(int, input().split()))
    cs_a0 = Counter(a for i, a in enumerate(aa) if i % 2 == 0)
    cs_a1 = Counter(a for i, a in enumerate(aa) if i % 2 == 1)

    vs_a0 = sorted(((v, k) for k, v in cs_a0.items()), reverse=True)
    vs_a1 = sorted(((v, k) for k, v in cs_a1.items()), reverse=True)

    if vs_a0[0][1] != vs_a1[0][1]:
        print(n - vs_a0[0][0] - vs_a1[0][0])
    else:
        res = n // 2
        if len(vs_a0) > 1:
            res = min(n - vs_a0[1][0] - vs_a1[0][0])
        if len(vs_a1) > 1:
            res = min(n - vs_a0[0][0] - vs_a1[1][0])
        print(res)


if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import Counter


def main():
    n = int(input())
    aa = list(map(int, input().split()))
    cs_a0 = Counter(a for i, a in enumerate(aa) if i % 2 == 0)
    cs_a1 = Counter(a for i, a in enumerate(aa) if i % 2 == 1)
    vs_a0 = sorted(((v, k) for k, v in cs_a0.items()), reverse=True)
    vs_a1 = sorted(((v, k) for k, v in cs_a1.items()), reverse=True)
    if vs_a0[0][1] != vs_a1[0][1]:
        print(n - vs_a0[0][0] - vs_a1[0][0])
    else:
        res = 1 << 30
        if len(vs_a0) == 1 and len(vs_a1) == 1:
            res = n // 2
        if len(vs_a0) > 1:
            res = min(res, n - vs_a0[1][0] - vs_a1[0][0])
        if len(vs_a1) > 1:
            res = min(res, n - vs_a0[0][0] - vs_a1[1][0])
        print(res)


if __name__ == "__main__":
    main()
h,w = map(int, input().split())
if max(h,w) >= 3:
  if h >= w :
    ans = w*min(1,(h%3))
  else:
    ans = h*min(1,(w%3))
if h%3 == 0:
  ans = 0
if w%3 == 0:
  ans = 0
if h != 1:  
  for i in range(1,h):
    ans_ = max(i*w,(h-i)*(w+(w%2))//2) - min(i*w,(h-i)*(w-(w%2))//2)
    ans = min(ans,ans_)
if w != 1:  
  for i in range(1,w):
    ans_ = max(i*h,(w-i)*(h+(h%2))//2) - min(i*h,(w-i)*(h-(h%2))//2)
    ans = min(ans,ans_)
print(ans)

### FIXED CODE ###

h,w = map(int, input().split())
ans = 1000000000
if max(h,w) >= 3:
  if h >= w :
    ans = w*min(1,(h%3))
  else:
    ans = h*min(1,(w%3))
if h%3 == 0:
  ans = 0
if w%3 == 0:
  ans = 0
for i in range(1,h):
  ans_ = max(i*w,(h-i)*(w+(w%2))//2) - min(i*w,(h-i)*(w-(w%2))//2)
  ans = min(ans,ans_)
for i in range(1,w):
  ans_ = max(i*h,(w-i)*(h+(h%2))//2) - min(i*h,(w-i)*(h-(h%2))//2)
  ans = min(ans,ans_)
print(ans)
import math
N, K = map(int,input().split())

#print(N,K)

N = math.gcd(N,K)

for i in range(10*7):
    N = abs(N-K)
    if N == 0:
        break

print(N)

### FIXED CODE ###

#
N, K = map(int,input().split())
N  %= K
min = N
for i in range(10**6):
    N = abs(N-K)
    if min > N:
        min = N
    if N == 0:
        min = 0
        break
print(min)
import sys
input = sys.stdin.readline

h,w=map(int,input().split())
s=[[] for i in range(h)]
for i in range(h):
    si=input()
    s[i]=si

ww=[[0]*w for i in range(h)]
www=[0]*w
for i in range(h):
    jsum=0
    jcnt=1
    jj=[0]*w
    for j in range(w):
        if s[i][j]==".":
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
    jcnt+=1
    jj[jcnt-1]=jsum
            
    for j in range(w):
        if s[i][j]==".":
            ww[i][j]=jj[www[j]]
                
hh=[[0]*w for i in range(h)]
hhh=[0]*h
for j in range(w):
    isum=0
    icnt=1
    ii=[0]*h
    for i in range(h):
        if s[i][j]==".":
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
    icnt+=1
    ii[icnt-1]=isum
            
    for i in range(h):
        if s[i][j]==".":
            hh[i][j]=ii[hhh[i]]
            
ijmax=0
for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1)

print(ijmax)
                


### FIXED CODE ###

import sys
input = sys.stdin.readline

h,w=map(int,input().split())
s=[[] for i in range(h)]
for i in range(h):
    si=input()
    s[i]=si
"""
h,w=4,6
s=[['#', '.', '.', '#', '.', '.'], ['.', '.', '.', '.', '.', '#'], ['.', '.', '.', '.', '#', '.'], ['#', '.', '#', '.', '.', '.']]    
"""
ww=[[0]*w for i in range(h)]
#www=[[0]*w for i in range(h)]
www=[0]*w
for i in range(h):
    jsum=0
    jcnt=1
    jj=[0]*(w+1)
    for j in range(w):
        if s[i][j]==".":
#            www[i][j]=jcnt
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
#            print(jsum,jst,jed)
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
    jcnt+=1
    jj[jcnt-1]=jsum
            
    for j in range(w):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            ww[i][j]=jj[www[j]]
#    print(jj)
                
hh=[[0]*w for i in range(h)]
hhh=[0]*h
for j in range(w):
    isum=0
    icnt=1
    ii=[0]*(h+1)
    for i in range(h):
        if s[i][j]==".":
#            www[i][j]=jcnt
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
#            print(jsum,jst,jed)
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
    icnt+=1
    ii[icnt-1]=isum
            
    for i in range(h):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            hh[i][j]=ii[hhh[i]]
#    print(jj)
            
ijmax=0
for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1)

print(ijmax)
W = raw_input().lower()
T= ""
while True:
    t = raw_input().lower()
    if t == "END_OF_TEXT":
        break;
    else:
        T += t

print(t.count(W))

### FIXED CODE ###

W = input().lower()
count = 0
while True:
    a = input()
    if a == "END_OF_TEXT":
        break
    a = a.lower()
    a = a.split()
    for i in range(len(a)):
        if W == a[i]:
            count += 1          
print(count)
A,B = map(int,input().split())
 
 
  def kaibun(m, n):
      key = 0
      for i in range(m,n+1):
          s = i//10000
          t = i%10
          u = i//1000 % 10
          v = i//10 % 10
          if (s==t)&(u==v):
              key += 1
      return key
 
  print(kaibun(A,B))

### FIXED CODE ###

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


def kaibun(n):
	key = 0
	for i in range(1,n+1):
		if str(i) == str(i)[::-1]:
			key += 1
	return key

print(kaibun(B)-kaibun(A-1))
import fractions
a,b,c,d = map(int, input().split())
gcd = fractions.gcd(c,d)
lcm = c * d / gcd
num = [c,d,lcm]
l = b - a + 1
count = 0
temp = []

for i in range(3):
  if l - num[i] >= 0:
    count += (num[i] - 1) * (l // num[i]) + (l % num[i])
  else:
    for j in range(a,b+1):
      if j % c == 0:
        count += 1
  temp.append(count)

ans = l - (count[0] + count[1] - count[2])
print(ans)

### FIXED CODE ###

import fractions
a,b,c,d = map(int, input().split())
gcd = fractions.gcd(c,d)
lcm = c * d // gcd
num = [c,d,lcm]
l = b - a + 1
temp = []

for i in range(3):
  count = 0
  if l - num[i] >= 0:
    count += l // num[i]
    if l % num[i] != 0:
      if b % num[i] < (b - (l % num[i]) + 1) % num[i]:
        count += 1
  else:
    if b % num[i] < l:
        count += 1
  temp.append(count)

ans = l - (temp[0] + temp[1] - temp[2])
print(ans)
N = int(input())
T = [[0,0,0]]+[map(int, input().split()) for _ in range(N)]
flag = 'Yes'
i = 0
while flag=='Yes' and i<len(T)-1:
	dis = abs(T[i+1][2]-T[i][2])+abs(T[i+1][1]-T[i][1])
	_t = T[i+1][0]-T[i][0]
	if dis > _t or _t%2 != dis%2:
		flag = 'No'
	i += 1        
print(flag)
    

### FIXED CODE ###

N = int(input())
T = [[0,0,0]]+[ [int(x) for x in input().split()] for _ in range(N)]

flag = 'Yes'
i = 0
while flag=='Yes' and i<len(T)-1:
    t1,x1,y1 = T[i] 
    t2,x2,y2 = T[i+1]
    dis = abs(x2-x1)+abs(y2-y1)
    _t = t2-t1
    if dis > _t or _t%2 != dis%2:
        flag = 'No'
    i += 1        
print(flag)
# coding= utf-8
lol=input("")
S1=int(lol[0:0])
S2=int(lol[1:1])
S3=int(lol[2:2])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
for 1 in Ss:
  cnt += 1
  del Ss[0]
else:
  print(cnt)
  break

### FIXED CODE ###

# coding= utf-8
lol=input("")
S1=int(lol[0:1])
S2=int(lol[1:2])
S3=int(lol[2:3])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
while 1 in Ss:
  cnt += 1
  del Ss[-1]
else:
  print(cnt)
n = int(input())
numList  = [input() for i in range(n)]
maxVal = max(numList)
workList = numList[:]
workList.remove(maxVal)
secondVal = max(workList)
for num in numList:
  if num != maxVal:
    print(maxVal)
  else:
    print(secondVal)

### FIXED CODE ###

r = int(input())
print(3 * r**2)
def main():
    N = input()
    edges = [raw_input() for _ in range(N-1)]
    K = input()
    VP = [raw_input() for _ in range(K)]

    VP = [map(int, _.strip().split()) for _ in VP]
    edges = [map(int, _.strip().split()) for _ in edges]
    # print VP
    # print edges
    scores = {}
    for n_idx, value in VP:
        scores[n_idx] = [value]
    pre_defined = scores.keys()
    # print scores
    def check(value, n1, n2):
        if value == (n1 - n2) or value == (n2 - n1):
            return True
        return False

    for n1, n2 in edges:
        # print n1, n2
        if scores.get(n1) is None and scores.get(n2) is None:
            pass
        else:
            if scores.get(n1) is None:
                for v in scores.get(n2, []):
                    scores[n1] = [_ for _ in scores.get(n1, []) if check(_, n1, n2)] + [v - 1, v+1]
            elif scores.get(n2) is None:
                for v in scores.get(n1, []):
                    scores[n2] = [_ for _ in scores.get(n2, []) if check(_, n1, n2)] + [v - 1, v+1]

    for n1, n2 in edges[-1::]:
        # print n1, n2
        if scores.get(n1) is None and scores.get(n2) is None:
            pass
        else:
            if scores.get(n1) is None:
                for v in scores.get(n2, []):
                    scores[n1] = [_ for _ in scores.get(n1, []) if check(_, n1, n2)] + [v - 1, v+1]
            elif scores.get(n2) is None:
                for v in scores.get(n1, []):
                    scores[n2] = [_ for _ in scores.get(n2, []) if check(_, n1, n2)] + [v - 1, v+1]

        # print scores.get(n1), scores.get(n2) 
        # print "----------"

    # decide step
    adding = []
    for n in range(1, N+1):
        v = scores.get(n, [None])[0]
        adding.append(v)
    if all([_ is not None for _ in adding]):
        print "Yes"
        for a in adding:
            print a
    else:
        print "No"


    # print scores


if __name__ == '__main__':
    main()

### FIXED CODE ###


def main():
    s = raw_input()
    check_b = lambda x: x=='B'
    check_w = lambda x: x=='W'
    if all(map(check_b, list(s))) or all(map(check_w, list(s))):
        return 0

    work = list(s)[:]
    flag_b = False
    flag_w = False
    stack = []
    cnt = 0
    for i in range(len(work)-1):
        w_list = work[i:i+2]
        if w_list[0] == w_list[1]:
            pass
        else:
            cnt += 1

    return cnt



if __name__ == '__main__':
    print main()
k = input()
A = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(int(A[k-1]))

### FIXED CODE ###

lists = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(int(lists[k-1]))
import heapq

def dijkstra(s):
    hq = [(0, s)]
    heapq.heapify(hq) # リストを優先度付きキューに変換
    cost = [float('inf')] * (h*w) # 行ったことのないところはinf
    cost[s] = 0 # 開始地点は0
    while hq:
        c, v = heapq.heappop(hq)
        if c > cost[v]: # コストが現在のコストよりも高ければスルー
            continue
        for d, u in e[v]:
            tmp = d + cost[v]
            if tmp < cost[u]:
                cost[u] = tmp
                heapq.heappush(hq, (tmp, u))
    return cost

h,w = map(int,input().split())
c = list(map(int,input().split()))
d = list(map(int,input().split()))
maze = [list(input()) for i in range(h)]
# eのインデックスはi*w+j
e = [[] for _ in range(h*w)]
for i in range(h):
    for j in range(w):
        if j<w-1 and maze[i][j] == "." and maze[i][j+1] == ".":
            e[i*w+j].append((0, i*w+j+1))
            e[i*w+j+1].append((0, i*w+j)) # 有向グラフでは削除
        if i<h-1 and maze[i][j] == "." and maze[i+1][j] == ".":
            e[i*w+j].append((0, (i+1)*w+j))
            e[(i+1)*w+j].append((0, i*w+j)) # 有向グラフでは削除
        for x in range(3):
            for y in range(3):
                if i+x<h and j+y<w and maze[i+x][j+y] == ".":
                    e[i*w+j].append((1, (i+x)*w+j+y))
                    e[(i+x)*w+j+y)].append((1, i*w+j)

# print(dijkstra(1))
ans = dijkstra((c[0]-1)*w+(c[1]-1))[(d[0]-1)*w+(d[1]-1)]
if ans == float("inf"):
    print(-1)
    exit()
print(ans)

### FIXED CODE ###

from collections import deque
# (sx, sy) から (gx, gy) への最短距離を求める
# 辿り着けないと INF
def bfs():
    # すべての点を INF で初期化
    d = [[float("inf")] * m for i in range(n)]
    # 移動4方向のベクトル
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]
    sx = c[0]
    sy = c[1]
    gx = g[0]
    gy = g[1]

    # 周辺25マス移動
    dd = []
    for i in range(-2,3):
        for j in range(-2,3):
            dd.append([i,j])

    # スタート地点をキューに入れ、その点の距離を0にする
    que = deque([])
    que.append((sx, sy))
    d[sx][sy] = 0
    # キューが空になるまでループ
    while que:
        # キューの先頭を取り出す
        p = que.popleft()
        # 取り出してきた状態がゴールなら探索をやめる
        if p[0] == gx and p[1] == gy:
            break
        # 移動4方向をループ
        for i in range(4):
            # 移動した後の点を (nx, ny) とする
            nx = p[0] + dx[i]
            ny = p[1] + dy[i]
            # 移動が可能かの判定とすでに訪れたことがあるかの判定
            # d[nx][ny] != INF なら訪れたことがある
            if 0 <= nx < n and 0 <= ny < m and maze[nx][ny] == "." and d[nx][ny] > d[p[0]][p[1]]:
                # 移動できるならキューに入れ、その点の距離を p からの距離 +1 で確定する
                que.appendleft((nx, ny))
                d[nx][ny] = d[p[0]][p[1]]
        for i in range(25):
            # 移動した後の点を (nx, ny) とする
            nx = p[0] + dd[i][0]
            ny = p[1] + dd[i][1]
            # 移動が可能かの判定とすでに訪れたことがあるかの判定
            # d[nx][ny] != INF なら訪れたことがある
            if 0 <= nx < n and 0 <= ny < m and maze[nx][ny] == "." and d[nx][ny] == float("inf"):
                que.append((nx, ny))
                d[nx][ny] = d[p[0]][p[1]]+1

    return d[gx][gy]

n, m = map(int, input().split())
c = list(map(lambda x:int(x)-1,input().split()))
g = list(map(lambda x:int(x)-1,input().split()))
maze = [list(input()) for i in range(n)]

ans = bfs()
if ans == float("inf"):
    print(-1)
else:
    print(ans)
import numpy as np
import math

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

sum_dif =  sum(B) - sum(A)

difference = list(np.array(B) - np.array(A))
manipulation_A = sum([d//2 for d in difference if d > 0])
manipulation_B = sum([-d for d in difference if d < 0])

if sum_dif < man_required_A + man_required_B:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

import math

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

total_manipulation =  sum(B) - sum(A)

manipulation_A = 0
manipulation_B = 0

for i in range(N):
    if A[i] < B[i]:
        manipulation_A += math.ceil((B[i] - A[i]) / 2)
        manipulation_B += (B[i] - A[i]) % 2
    elif A[i] > B[i]:
        manipulation_B += A[i] - B[i]

if total_manipulation - max(manipulation_A, manipulation_B) >= 0:
    print("Yes")
else:
    print("No")
a, b = map(int, input().split())
c, d = map(int, input().split())
if (a*b)==(c*d):
 print((a*b)-(c*d))
else if (a*b) > (c*d):
 print(c*d)

### FIXED CODE ###

a, b = map(int, input().split())
c, d = map(int, input().split())
print((a-c)*(b-d))
n=int(input())
a=list(map(int,input().split()))
bbottom=""
btop=""
for i in range(n):
  if i%2==0:
    bbottom+=a[i]
  else:
    btop+=a[i]
ans=btop[::-1]+bbottom
if n%2==1:
  ans=ans[::-1]
prin(ans)
       

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
bbottom=[]
btop=[]
for i in range(n):
  if i%2==0:
    bbottom.append(a[i])
  else:
    btop.append(a[i])
ans=btop[::-1]+bbottom
if n%2==1:
  ans=ans[::-1]
print(*ans)
L = []
N = L.append(int(input))
if len(N) == 1:
  print("Hello world")
  
else:
  print(N[2]+N[3])

### FIXED CODE ###

N = int(input())
if N == 1:
  print("Hello World")
else:
  A = int(input())
  B = int(input())
  print(A+B)
n,m=map(int,input().split())
a = [0]*n
for i in range(m):
  a[int(input())-1] = 1

s=[0]*n
if a[0] == 1:
  s[0] = 0
  s[1] = 1
elif a[1] == 1:
  s[0] = 1
  s[1] = 0
elif a[0]==1 and a[1] == 1:
  s[0] = 0
  s[1] = 0
else:
  s[0] = 1
  s[1] = 2
  
for i in range(2,n):
  #壊れている
  if a[i] == 1:
    s[i] = 0
  else:
    s[i] = s[i-1]+s[i-2]
print(s[n-1]%1000000007)


### FIXED CODE ###

n,m=map(int,input().split())
a = [0]*n
if n!=1:
  if m!=0:
    for i in range(m):
      a[int(input())-1] = 1

  s=[0]*n
  if a[0]==1 and a[1] == 1:
    s[0] = 0
    s[1] = 0
  elif a[0] == 1:
    s[0] = 0
    s[1] = 1
  elif a[1] == 1:
    s[0] = 1
    s[1] = 0
  else:
    s[0] = 1
    s[1] = 2

  for i in range(2,n):
    #壊れている
    if a[i] == 1:
      s[i] = 0
    else:
      s[i] = s[i-1]+s[i-2]
  print(s[n-1]%1000000007)
else:
  print(1)
str = input()

if str == "ABC":
    print(ARC)
else:
    print(ABC)


### FIXED CODE ###

str = input()

if str == "ABC":
    print("ARC")
else:
    print("ABC")
n = int(input())
a = list(map(int,input().split()))
a.sort()
b = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 
     131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 
     67108864, 134217728, 268435456, 536870912]

t = []
bIdx = 0
for aa in a :
    while b[bIdx] <= aa:
        bIdx += 1   
    t.append(b[bIdx]-aa)
t.reverse()
a.sort(reverse=True)

c = {}
for aa in a:
    if aa in c:
        c[aa] += 1
    else:
        c[aa] = 1

sum = 0
i = 0

u = [0 for i in range(len(a))]

for i in range(len(a)-1):

    if t[i] in c :
        if c[t[i]] > 0 :
            if c[t[i]] == 1 and a[i] == t[i]:
                pass
            else:
                sum += 1
                c[t[i]] -= 1
        
print(sum)

### FIXED CODE ###

from bisect  import bisect_left

n = int(input())
a = list(map(int,input().split()))
a.sort()
#print(a)

sum = 0
for i in range (len(a)-1,-1,-1):

    b = 1
    while b <= a[i]:
        b = b<<1
    t = b - a[i]
    #print("2^",t)

    k = bisect_left(a,t)
    if a[k] == t and k < i:
        sum += 1
        a[k] -= 0.1
        a[i] += 0.1
print(sum)
a, b = int(input().split())

if a >= 13:
  print(b)
  end()
  
if a >= 6:
  b /= 2
  print(b)
  end()
  
print(0)

### FIXED CODE ###

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

if a >= 13:
  print(b)
  
elif a >= 6:
  b //= 2
  print(b)
  
else:
  print(0)
#C - Stones
#黒い石のすぐ右に白い石があるような箇所がないようにしたいです。 

n = int(input())
state = input()
state_list = list(state)
prob_num = 0
state_list.append(" ")
for i in range(n):
	if state_list[i] == "#" and state_list[i+1] == ".":
		prob_num += 1

print(prob_num)

### FIXED CODE ###

#A - On the Way

coords = list(map(int, input().split()))
a, b, c = coords

if a < c < b:
	print("Yes")
elif b < c < a:
	print("Yes")
else:
	print("No")