Harryxun/stf_run huggingface dataset:
S = int(input())

if S[0] == S[1] or S[0] == S[2] or S[0] == S[3] or S[1] == S[2] or S[1] == S[3] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')


### FIXED CODE ###

s = input()

if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
  print('Good')
else:
  print('Bad')
n=int(input())
def dfs(s):
    if int(s)>n:
        return 0 
    if all(s.count(i) for i in '753'):
        ans=1
    else:
        ans=0
    for i in '753':
        ans+=dfs(s+i)
    return ans
print(ans)

### FIXED CODE ###

x=int(input())
if x==3 or x==5 or x==7:
    print('YES')
else:
    print('NO')
a,p = map(int,input().split())
a == a*3*p
a + p == int,ap
print(ap)


### FIXED CODE ###

a,p = map(int,input().split())
print((a*3+p)//2)
WHITE = 0
GRAY = 1
BLACK = 2
color, d, f = [WHITE for i in range(n)]
t = 1

def visit(u):
    color[u] = GRAY
    d[u] += t
    t += 1
    for v in range(n):
        if (M[u-1][v-1] == 0):
            continue
        if (color[v] == WHITE):
            visit(v)
    color[u] = BLACK
    f[u] = t
    t += 1

for u in range(n):
    if (color[u] == WHITE):
        visit(u)
for u in range(n):
    print(str(u+1), str(d[u]), str(f[u]), sep = " ")

n = int(input())
M = [[0 for i in range(n)] for i in range(n)]
for i in range(n):
    temp = list(map(int, input().split()))
    for i in range(temp[1]):
        M[temp[0]-1][temp[i+2]-1] = 1

### FIXED CODE ###

def dfs(u):
    global dfs_color, d, f, t
    color[u] = GRAY
    d[u] += t
    t += 1
    for v in range(n):
        if (M[u][v] == 0):
            continue
        else:
            if (color[v] == WHITE):
               dfs(v)
    color[u] = BLACK
    f[u] = t
    t += 1

n = int(input())
M = [[False for i in range(n)] for j in range(n)]
for i in range(n):
    tmp = list(map(int, input().split()))
    for j in range(tmp[1]):
        M[tmp[0]-1][tmp[j+2]-1] = True

WHITE = 0
GRAY = 1
BLACK = 2
color = [WHITE for i in range(n)]
d = [0 for i in range(n)]
f = [0 for i in range(n)]
t = 1

for u in range(n):
    if (color[u] == WHITE):
        dfs(u)
for u in range(n):
    print(str(u+1), str(d[u]), str(f[u]), sep = " ")
x = int(raw_input())
y = int(raw_input())
print x+y/2

### 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
 
x, y = na()
print(x+y//2)
import math
s = list(input())
ss = s[:]
k = int(input())
cnt = 0

if len(set(s)) == 1:
    cnt = math.floor(len(s) * k / 2)
else:
    cnt = 0
    for i in range(len(s) - 1):
        if s[i] == s[i + 1]:
            cnt += 1
            s[i + 1] = '*'
    cnt *= k
    if s[0] == s[-1]:
        a = 0
        for i in range(len(s) - 1):
            if ss[i] == ss[i + 1]:
                a += 1
        b = 0
        for j in range(len(s), 0, -1):
            if ss[j] == ss[j - 1]:
                b += 1
        cnt -= (k - 1) * (math.floor(a / 2) + math.floor(b / 2) - math.floor((a + b) / 2))
print(cnt)

### FIXED CODE ###

import math
s = list(input())
ss = s[:]
k = int(input())
cnt = 0

if len(set(s)) == 1:
    cnt = math.floor(len(s) * k / 2)
else:
    cnt = 0
    for i in range(len(s) - 1):
        if s[i] == s[i + 1]:
            cnt += 1
            s[i + 1] = '*'
    cnt *= k
    if ss[0] == ss[-1]:
        a = 1
        for i in range(len(ss) - 1):
            if ss[i] == ss[i + 1]:
                a += 1
            else:
                break
        b = 1
        for j in range(len(ss) - 1, 0, -1):
            if ss[j] == ss[j - 1]:
                b += 1
            else:
                break
        cnt -= (k - 1) * (math.floor(a / 2) + math.floor(b / 2) - math.floor((a + b) / 2))
print(cnt)
n,k=map(int,input().split())
ans=0
while n>k:
  n//=k
  ans+=1

print(ans+1)

### FIXED CODE ###

n,r=map(int,input().split())
if n>=10:
  print(r)
else:
  print(r+100*(10-n))
class SCC:
    def __init__(self, n):
        self.n = n
        self.graph = [[] for _ in range(n)]
        self.graph_rev = [[] for _ in range(n)]
        self.already = [False]*n
    
    def add_edge(self, fr, to):
        if fr == to:
            return
        self.graph[fr].append(to)
        self.graph_rev[to].append(fr)
    
    def dfs(self, node, graph):
        self.already[node] = True
        for n in graph[node]:
            if self.already[n]:
                continue
            self.dfs(n, graph)
        self.order.append(node)
    
    def first_dfs(self):
        self.already = [False]*self.n
        self.order = []
        for i in range(self.n):
            if self.already[i] == False:
                self.dfs(i, self.graph)
    
    def second_dfs(self):
        self.already = [False]*self.n
        self.ans = []
        for n in reversed(self.order):
            if self.already[n]:
                continue
            self.already[n] = True
            self.order = []
            self.dfs(n, self.graph_rev)
            self.order.reverse()
            self.ans.append(self.order)

    def scc(self):
        self.first_dfs()
        self.second_dfs()
        return self.ans


def main():
    n, m = map(int, input().split())
    scc = SCC(n)

    for i in range(m):
        a, b = map(int, input().split())
        scc.add_edge(a, b)
    
    scc_list = scc.scc()
    print(len(scc_list))
    for s in scc_list:
        print(len(s), end=" ")
        print(*s)

        
    
if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)

class SCC:
    def __init__(self, n):
        self.n = n
        self.graph = [[] for _ in range(n)]
        self.graph_rev = [[] for _ in range(n)]
        self.already = [False]*n
    
    def add_edge(self, fr, to):
        if fr == to:
            return
        self.graph[fr].append(to)
        self.graph_rev[to].append(fr)
    
    def dfs(self, node, graph):
        self.already[node] = True
        for n in graph[node]:
            if self.already[n]:
                continue
            self.dfs(n, graph)
        self.order.append(node)
    
    def first_dfs(self):
        self.already = [False]*self.n
        self.order = []
        for i in range(self.n):
            if self.already[i] == False:
                self.dfs(i, self.graph)
    
    def second_dfs(self):
        self.already = [False]*self.n
        self.ans = []
        for n in reversed(self.order):
            if self.already[n]:
                continue
            self.already[n] = True
            self.order = []
            self.dfs(n, self.graph_rev)
            self.order.reverse()
            self.ans.append(self.order)

    def scc(self):
        self.first_dfs()
        self.second_dfs()
        return self.ans


def main():
    n, m = map(int, input().split())
    scc = SCC(n)

    for i in range(m):
        a, b = map(int, input().split())
        scc.add_edge(a, b)
    
    scc_list = scc.scc()

    print(len(scc_list))
    for s in scc_list:
        print(len(s), end=" ")
        print(*s)

    
if __name__ == "__main__":
    main()
import sys
from collections import deque
stdin = sys.stdin

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

n, x = na()
bg = "BPPPB"
for i in range(n-1):
    bg = "B" + bg + "P" + bg + "B"
    if len(bg) > x:
        bg = bg[:x]
print(bg[:x].count("P"))

### FIXED CODE ###

import sys
from collections import deque
stdin = sys.stdin

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

n, x = na()
a = [1]
p = [1]
for i in range(n):
    a.append(a[i] * 2 + 3)
    p.append(p[i] * 2 + 1)

def f(n, x):
    if n == 0:
        return 0 if x <= 0 else 1
    elif x <= 1 + a[n-1]:
        return f(n-1, x-1)
    else:
        return p[n-1] + 1 + f(n-1, x-2-a[n-1])

print(f(n,x))
s = input()
for i in range(N):
  if s[i] == 'A':
    left = i
    break
    
for i in range(N):
  if s[N-1-i] == 'Z':
    right = N-1-i
    
print(right - left + 1)

### FIXED CODE ###

s = input()
N = len(s)
for i in range(N):
  if s[i] == 'A':
    left = i
    break
    
for i in range(N):
  if s[N-1-i] == 'Z':
    right = N-1-i
    break
    
print(right - left + 1)
import sys
readline = sys.stdin.readline

# 0-indexでやる

D = int(readline())
C = list(map(int,readline().split())) # 満足度の下がりやすさ
S = [None] * D
sortS = [None] * D
for i in range(D):
  s = list(map(int,readline().split()))
  S[i] = s.copy()
  for j in range(len(s)):
    s[j] = (s[j],j)
  sortS[i] = sorted(s, key = lambda x:x[0], reverse = True)

def make_ans(D,C,limiter = 52, threshold = 26, balance = 0.5):
  ans = []
  last_submit = [-26] * 26
  for i in range(D):
    info = sortS[i]
    
    # limiter回以上提出がないものがあれば、threshold回を超えたもののうちCの値が高いものを提出
    if i - min(last_submit) >= limiter:
      ind = -1
      for j in range(len(last_submit)):
        if i - last_submit[j] >= threshold:
          if ind == -1:
            ind = j
          else:
            if C[ind] < C[j]:
              ind = j
      ans += [ind]
      last_submit[ind] = i
      continue
      
    topval = info[0][0]
    for j in range(len(info)):
      val = info[j][0]
      if val < topval * (balance):
        continue # 最高値の半分になるのであればやめよう
      index = info[j][1]
      if i - last_submit[index] < 26:
        continue
      ans += [index]
      last_submit[index] = i
      break
    else:
      ans += [info[0][1]]
  return ans

def calc_score(arr):
  point = 0
  last_submit = [0] * 26
  for i in range(len(arr)):
    # i日目
    point += S[i][arr[i]]
    for j in range(len(last_submit)):
      point -= (i - last_submit[j]) * C[i]
  return point
      
ans = make_ans(D,C)
best = calc_score(ans)
for limiter in range(30,60):
  for threshold in range(26, limiter):
    for balance in (0.2, 0.25, 0.42, 0.5, 0.63, 0.75, 0.8):
      new_ans = make_ans(D,C,limiter,threshold,balance)
      new_score = calc_score(new_ans)
      if new_score > best:
        ans = new_ans
        best = new_score
  
def show(arr):
  for a in arr:
    print(a + 1)
    
show(ans)

### FIXED CODE ###

import sys
readline = sys.stdin.readline

D = int(readline())
C = list(map(int,readline().split()))
for i in range(D):
  S = list(map(int,readline().split()))
  
for i in range(D):
  print(1)
x=input()
a=x[0]
b=x[1]
c=x[2]
if a=="7":
  print("Yes")
  break
elif b=="7":
  print("Yes")
  break
elif c=="7":
  print("Yes")
  break
else:
  print("No")

### FIXED CODE ###

x=input()
a=x[0]
b=x[1]
c=x[2]
if a=="7":
  print("Yes")
elif b=="7":
  print("Yes")
elif c=="7":
  print("Yes")
else:
  print("No")
N, K = map(int, input().split())
mem = set()
for _ in range(K):
  _ = input()
  mem = mem | {input().split()}
mem_count = len(mem)
print(N-mem_count)

### FIXED CODE ###

N, K = map(int, input().split())
mem = set()
for _ in range(K):
  _ = input()
  mem = mem | set(map(int, input().split()))

mem_count = len(mem)
print(N-mem_count)
a,b = map(input().split())
a = int(a)
b = float(b)
b = b*100
s = (a*b)//100
print(int(s))

### FIXED CODE ###

a,b = map(float,input().split())
a = int(a)
b = round(float(b)*100)
print((a*b)//100)
N,M=list(map(int,input().split()))
    si=[0]*N
    ans=0
    for i in range(M):
        S=int(input())
        who=list(map(int(input())))
        for k in range(S):
            si[who[k]]+=1
    for h in range(N):
        if si[h]==0:
          ans+=1
print(ans)

### FIXED CODE ###

N,M=list(map(int,input().split()))
si=[0]*N
ans=0
for i in range(M):
    S=int(input())
    who=list(map(int,input().split()))
    for k in range(S):
        si[who[k]-1]+=1
for h in range(N):
  if si[h]==0:
    ans+=1
print(ans)
N = int(input())
l = []
for i in range(N):
  Si = input()
  if not Si in l:
    l.append(Si)
print(len(l))

### FIXED CODE ###

s, w =map(int, input().split())
if s > w:
  print("safe")
else:
  print("unsafe")
import sympy
n=int(input())
if sympy.isprime(n)==True:
    print(n)
else:
    print(sympy.nextprime(n))

### FIXED CODE ###

x=int(input())

def isprime(n):
    if n==1:
        return False
    else:
        for i in range(2,int(n**0.5)+1):
            if n%i==0:
                return False
        return True
        
while True:
    if isprime(x):
        print(x)
        exit()
    else:
        x+=1
n,m=[int(i) for i in input().split()]
l=[]
for i in range(n):
    a=int(input())
    l.append(a)
l=sorted(l)
b=l[0:m]
print(b)
max=10**9
for i in range(0,(n-m)):
    b.pop(0)
    b.append(l[i+m])
    c=(max(b)-min(b))
    if(c<max):
        max=c
print(max)

### FIXED CODE ###

N, K = map(int, input().split())
h = sorted([int(input()) for i in range(N)])

hmax = 0
hmin = 0
ans = 10**10
for i in range(N - K + 1):
    hmax = h[i + K - 1]
    hmin = h[i]
    if hmax - hmin < ans:
        ans = hmax - hmin
print(ans)
import math

a, b, x = map(int, input().split())
if x <= a*a*b/2:
    y = 2*x/(a*b)
    X = math.degrees(math.atan(b/y))
else:
    y = b - x/(a*a)
    X = 90-math.degrees(math.atan(a/2/y))

print(X)

### FIXED CODE ###

import math
 
a, b, x = map(int, input().split())
if x == a*a*b:
    p = 0
elif x <= a*a*b/2:
    p = math.degrees(math.atan(b/(2*x/(a*b))))
else:
    p = 90-math.degrees(math.atan(a/2/(b - x/(a*a))))

print(p)
import numpy as np
def divisor_num(n):
    if n == 1:
        return 1
    arr = []
    temp = n
    for i in range(2,int(np.sqrt(n))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(cnt)
    
    if temp!=1:
        arr.append(1)

    if arr==[]:
        arr.append(1)
    
    ans = 1
    for num in arr:
        ans *= num+1
    
    return ans

n = int(input())
total = 0
for i in range(1,n+1):
    total += i*divisor_num(i)


### FIXED CODE ###

n = int(input())

ans = 0
for i in range(1,n+1):
    num = n//i
    ans += num*(i+i*num)//2

print(ans)
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

    N, W = map(int,input().split())
    w = [0]*N
    v = [0]*N
    for i in range(N):
        w[i], v[i] = map(int, input().split())
    dp = [0]*(W+1)
    for i in range(N):
        for j in range(W, w[i]-1, -1):
            dp[j] = max(dp[j], dp[j-w[i]]+v[i])
    print(max(dp))

if __name__ == '__main__':
    main()


### FIXED CODE ###

#典型ナップザック
#10**9はMLE(pypyではRE)

def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

    N, W = map(int, input().split())
    w = [0]*N
    v = [0]*N
    for i in range(N):
        w[i], v[i] = map(int, input().split())
    V = 10**5+1
    inf = float('inf')
    dp = [inf]*V
    dp[0] = 0
    for i in range(N):
        for j in range(V, v[i]-1, -1):
            if dp[j-v[i]]+w[i]<=W:
                dp[j] = min(dp[j], dp[j-v[i]]+w[i])
    for i in range(V):
        if dp[-(i+1)]<=W:
            print(V-(i+1))
            exit()
            
if __name__ == '__main__':
    main()
n = int(input())
a = list(map(int, input().split()))
result = 0
for i in range(n):
  for j in range(i + 1, n):
    result += a[i] * a[j]
result = result % (10**9 + 7)
print(result)


### FIXED CODE ###

d, t, s = map(int, input().split())
if s * t < d:
  print("No")
else:
  print("Yes")
N, M = map(int, input().split())

P = list()
for m in range(M):
    n, rst = input().split()
    n = int(n)
    P.append( (n, rst) )


ck = [False for _ in range(N+1)]

ret_cor, ret_pen = 0, 0

for n, rst in P:
    if rst == 'AC':
        if not ck[n]:
            ck[n] = True
            ret_cor += 1

    else: # rst == 'WA'
        if not ck[n]:
            ret_pen += 1

print(ret_cor, ret_pen)


### FIXED CODE ###

l = input()

print(chr(ord(l)+1))
N,M,K = map(int, input().split())
V = []

color = [-1]*N
V_block = []

#各連結成分の次元テーブル
dic = {}

dim = 0
#深さ優先探索
def dfs(node, c):
    global dim

    if color[node]!=-1:
        return
    color[node] = c
    dim = dim + 1
    for next_node in V[node]:
        dfs(next_node, c)
    return

for _ in range(N):
    V.append(set())
    V_block.append(set())
for _ in range(M):
    a,b = map(int, input().split())
    V[a-1].add(b-1)
    V[b-1].add(a-1)

#一旦捨てる
for _ in range(K):
    c,d = map(int, input().split())
    V_block[c-1].add(d-1)
    V_block[d-1].add(c-1)
    
c = 0
for node in range(N):
    if color[node]!=-1:
        continue
    dim = 0
    dfs(node, c)
    dic[c] = dim

    c = c + 1

ans_list = []
for node in range(N):
    num = 0
    for block_node in V_block[node]:
        if color[node]==color[block_node]:
            num = num + 1
    ans_list.append(dic[color[node]]-num-len(V[node])-1)

print(*ans_list)



### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)
N,M,K = map(int, input().split())
V = []

color = [-1]*N
V_block = []

#各連結成分の次元テーブル
dic = {}

dim = 0
#深さ優先探索
def dfs(node, c):
    global dim

    if color[node]!=-1:
        return
    color[node] = c
    dim = dim + 1
    for next_node in V[node]:
        dfs(next_node, c)
    return

for _ in range(N):
    V.append(set())
    V_block.append(set())
for _ in range(M):
    a,b = map(int, input().split())
    V[a-1].add(b-1)
    V[b-1].add(a-1)

#一旦捨てる
for _ in range(K):
    c,d = map(int, input().split())
    V_block[c-1].add(d-1)
    V_block[d-1].add(c-1)
    
c = 0
for node in range(N):
    if color[node]!=-1:
        continue
    dim = 0
    dfs(node, c)
    dic[c] = dim

    c = c + 1

ans_list = []
for node in range(N):
    num = 0
    for block_node in V_block[node]:
        if color[node]==color[block_node]:
            num = num + 1
    ans_list.append(dic[color[node]]-num-len(V[node])-1)

print(*ans_list)
import sys

loops1 = 4
loops2 = 5
arg1 = 0
arg2 = 1

i=0
j=0

int args = [input() for i in range(6)]

for i in range(arg1,loops1):
	for j in range(arg2,loops2):
		if (args[j] - args[i]) > args[5]:
			print(":(")
			sys.exit()
print("Yay!")
	            

### FIXED CODE ###

import sys

loops1 = 4
loops2 = 5
arg1 = 0
arg2 = 1

i=0
j=0

args = [int(input()) for i in range(6)]

for i in range(arg1,loops1):
	for j in range(arg2,loops2):
		if (args[j] - args[i]) > args[5]:
			print(":(")
			sys.exit()
print("Yay!")
import sys
from itertools import accumulate

sys.setrecursionlimit(10 ** 5)


def dfs1(v, p):
    parent[v] = p
    stc = subtree_count[v]
    cnt = 1
    for u in links[v]:
        if u == p:
            continue
        result = dfs1(u, v)
        stc[u] = result
        cnt += result
    return cnt


def dfs2(v, pc):
    # pc: vを根とした時の、parent方面の部分木のノード数
    global ans

    if len(subtree_count[v]) == 0:
        return

    p = parent[v]
    children, st_counts = map(list, zip(*subtree_count[v].items()))
    children.append(p)
    st_counts.append(pc)
    cl = len(st_counts)
    ct = sum(st_counts)

    for u, stc in subtree_count[v].items():
        dfs2(u, ct - stc + 1)

    if cl == 1:
        return

    prob_fwd = [0] + list(accumulate(st_counts[:-1]))
    prob_bwd = [0] + list(accumulate(st_counts[-1:0:-1]))
    prob_bwd.reverse()
    tmp = 0
    for pf, pb in zip(prob_fwd, prob_bwd):
        tmp = (tmp + d2s[pf + pb]) % MOD
    tmp = (tmp - d2s[ct] * (cl - 1)) % MOD
    ans = (ans + (1 - tmp) * d2) % MOD


n = int(input())
links = [set() for _ in range(n)]
for line in sys.stdin:
    a, b = map(int, line.split())
    a -= 1
    b -= 1
    links[a].add(b)
    links[b].add(a)
root = 0
parent = [-1] * n
subtree_count = [{} for _ in range(n)]  # 根がrootの時の、vの子の各部分木のノード数
MOD = 10 ** 9 + 7
d2 = 500000004  # 2^-1 mod 10**9+7
d2s = [1]
for i in range(n):
    d2s.append(d2s[-1] * d2 % MOD)
ans = 0
dfs1(root, -1)
# print(parent)
# print(subtree_count)
dfs2(root, 0)
print(ans)


### FIXED CODE ###

import sys


def dfs1(root, links):
    parent = [0] * n
    subtree_count = [{} for _ in range(n)]
    q = [(root, -1, 0)]  # 2番目:親  3番目:0=初, 1=全ての子巡回後
    while q:
        v, p, t = q.pop()
        if t == 0:
            parent[v] = p
            q.append((v, p, 1))
            for u in links[v]:
                if u == p:
                    continue
                q.append((u, v, 0))
        elif p != -1:
            subtree_count[p][v] = sum(subtree_count[v].values()) + 1
    return parent, subtree_count


def dfs2(root, parent, subtree_count, d2, d2s):
    ans = 0
    q = [(root, 0)]
    while q:
        v, pc = q.pop()

        if len(subtree_count[v]) == 0:
            continue

        p = parent[v]
        children, st_counts = map(list, zip(*subtree_count[v].items()))
        children.append(p)
        st_counts.append(pc)
        cl = len(st_counts)
        ct = sum(st_counts)

        for u, stc in subtree_count[v].items():
            q.append((u, ct - stc + 1))

        if cl == 1:
            continue

        tmp = 0
        for stc in st_counts:
            tmp = (tmp + d2s[ct - stc]) % MOD
        tmp = (tmp - d2s[ct] * (cl - 1)) % MOD
        ans = (ans + (1 - tmp) * d2) % MOD
    return ans


n = int(input())
links = [set() for _ in range(n)]
for line in sys.stdin:
    a, b = map(int, line.split())
    a -= 1
    b -= 1
    links[a].add(b)
    links[b].add(a)
root = 0
MOD = 10 ** 9 + 7
d2 = 500000004  # 2^-1 mod 10**9+7
d2s = [1]
for i in range(n):
    d2s.append(d2s[-1] * d2 % MOD)
parent, subtree_count = dfs1(root, links)
# print(parent)
# print(subtree_count)
ans = dfs2(root, parent, subtree_count, d2, d2s)
print(ans)
A, B, C = map(int, input().split())

if A < C and C < B:
    print("Yes")
elif: B < C and C < A
    print("Yes")
else:
    print("No")


### FIXED CODE ###

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

if A < C and C < B:
    print("Yes")
elif B < C and C < A:
    print("Yes")
else:
    print("No")