CodeEff/ECCO huggingface dataset:
# Original solution
import itertools
A, B, C = list(map(int, input().split()))
K = int(eval(input()))
targets = [A, B, C]
answer = 'No'

def check(targets):
    if targets[1] > targets[0] and targets[2] > targets[1]:
        return True
    else:
        return False

cases = itertools.product([0, 1, 2], repeat=K)
for case in cases:
    copy_targets = targets.copy()
    for i in case:
        copy_targets[i] = copy_targets[i] * 2
    if check(copy_targets):
        answer = 'Yes'
        break

print(answer)

# Optimized solution
import itertools

def check(targets):
    if targets[1] > targets[0] and targets[2] > targets[1]:
        return True
    else:
        return False


if __name__ == "__main__":
    A, B, C = list(map(int, input().split()))
    K = int(eval(input()))
    targets = [A, B, C]
    answer = 'No'

    cases = itertools.product([0, 1, 2], repeat=K)
    for case in cases:
        copy_targets = targets.copy()
        for i in case:
            copy_targets[i] = copy_targets[i] * 2
        if check(copy_targets):
            answer = 'Yes'
            break

    print(answer)
# Original solution
r, g, b = list(map(int, input().split()))
k = int(eval(input()))

def dfs(i , r, g, b):
    if i > k: return False
    if r < g < b: return True
    if dfs(i+1, r*2, g,   b  ): return True
    if dfs(i+1, r,   g*2, b  ): return True
    if dfs(i+1, r,   g,   b*2): return True
    return False

print(('Yes' if dfs(0, r, g, b) else 'No'))


# Optimized solution
r, g, b = list(map(int, input().split()))
K = int(eval(input()))
for i in range(K+1):
    for j in range(K+1-i):
        for k in range(K+1-i-j):
            rr, gg, bb = r * (1<<i), g * (1<<j), b * (1<<k)
            if rr < gg < bb:
                print('Yes')
                exit()
print('No')
# Original solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))

while K > 0:
    if B < A:
        B *= 2
        K -= 1
    elif C < B:
        C *= 2
        K -= 1
    
    if B > A and C > B:
        break

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

# Optimized solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))

for i in range(K):
    if B <= A:
        B *= 2
    elif C <= B:
        C *= 2

if B > A and C > B:
    print("Yes")
else:
    print("No")
# Original solution
A, B, C = [int(v) for v in input().strip().split(" ")]
K = int(input().strip())

while K > 0:
    if B <= A:
        B *= 2
        K -= 1
    elif C <= B:
        C *= 2
        K -= 1

if C > B > A:
    print("Yes")
else:
    print("No")

# Optimized solution
A, B, C = [int(v) for v in input().strip().split(" ")]
K = int(input().strip())

while K > 0:
    if B <= A:
        B *= 2
        K -= 1
    elif C <= B:
        C *= 2
        K -= 1
    else:
        break

if C > B > A:
    print("Yes")
else:
    print("No")
# Original solution
a = list(map(int,input().split()))
k = int(eval(input()))
#青＞緑＞赤
r,g,b = 0,0,0
for i,num in enumerate(a):
    if i==0:
        r = num
    elif i==1:
        g = num
    elif i==2:
        b = num

count = 0
while count<k:
    if g<r:
        g *= 2
        count += 1

    elif b<g:
        b *= 2
        count += 1
    
    if b>g and g>r:
        break

if b>g and g>r:
    print("Yes")
else:
    print("No")

# Optimized solution
import sys
r,g,b = list(map(int,input().split()))
k = int(eval(input()))
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<=r:
        g*=2
        count += 1
else:
    print("No")
    sys.exit(0)

if b*(2**(k-count))>g:
    print("Yes")
else:
    print("No")
# Original solution
rgb = list(map(int, input().split(' ')))
r = rgb[0]
g = rgb[1]
b = rgb[2]
k = int(eval(input()))

for i in range(k):
    if(r >= g):
        g = g * 2
    elif(g >= b):
        b = b * 2

if (r < g < b):
    print('Yes')
else:
    print('No')


# Optimized solution
def resolve():
    a, b, c = list(map(int, input().split()))
    k = int(eval(input()))
    
    for i in range(k):
        if (a >= b):
            b *= 2
        elif (b >= c):
            c *= 2
    
    if(a < b < c):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    resolve()
# Original solution
a,b,c = list(map(int,input().split()))
k = int(eval(input()))
for _ in range(k):
	if b <= a:
		b *= 2
	else:
		c *= 2
if a < b < c:
	print("Yes")
else:
	print("No")

# Optimized solution
a,b,c,k=list(map(int,open(0).read().split()))
while k>0:
	if b<=a:b*=2
	else:c*=2
	k-=1
print(('YNeos'[a>=b or b>=c::2]))
# Original solution
A,B,C = list(map(int,input().split()))
K = int(eval(input()))
flag = True

    
  
for i in range(K+1):
  num = K-i
  for j in range(num+1):
    num2 = num-j
    if A*2**i<B*2**j:
      if B*2**j<C*2**num2:
        print("Yes")
        flag = False
        break
  if flag ==False:
    break
        
if flag == True:
  print('No')
        
    
    



# Optimized solution
N,M,K = list(map(int,input().split()))
num = int(eval(input()))
while num>0:
  if K<=M or K<=N:
    K = K*2
    num -= 1
  elif M<=N:
    M = M*2
    num -= 1
  elif M>N:
    K = K*2
    num -= 1
    
if N<M and M<K:
  print('Yes')
else:
  print('No')
# Original solution
a, b, c = list(map(int, input().split()))
k = int(eval(input()))

flg = False

for i in range(k+1):
  d = 2**i*b
  e = 2**(k-i)*c
  if a < d < e:
    flg = True
    break

if flg:
  print('Yes')
else:
  print('No')

# Optimized solution
a, b, c = list(map(int, input().split()))
k = int(eval(input()))

cnt = 0
while a >= b:
  b *= 2
  cnt += 1
while b >= c:
  c *= 2
  cnt += 1
if cnt <= k: print('Yes')
else: print('No')
# Original solution
l = list(map(int, input().split()))
k = int(eval(input()))

while(k > 0):
    if l[0] > l[1]:
        l[1] *= 2
        k -= 1
    elif l[1] > l[2]:
        l[2] *= 2
        k -= 1
    
    if l[0] < l[1] and l[1] < l[2]:
        print('Yes')
        exit()

print('No')

# Optimized solution
r,g,b = list(map(int, input().split()))
k = int(eval(input()))

for _ in range(k):
    if r >= g:
        g *= 2
    elif g >= b:
        b *= 2
    
    if r < g and g < b:
        print('Yes')
        exit()

print('No')
# Original solution
a, b, c = list(map(int, input().split(' ')))
k = int(eval(input()))

def Base_to_3(X):
    if(int(X/3)):
        return Base_to_3(int(X/3))+str(X%3)
    return str(X%3)

for i in range(3**k):
    comb = Base_to_3(i)
    red = a*(2**comb.count('0'))
    green = b*(2**comb.count('1'))
    blue = c*(2**comb.count('2'))
    if red < green and green < blue:
        print('Yes')
        exit()

print('No')

# Optimized solution
a, b, c = list(map(int, input().split(' ')))
k = int(eval(input()))
cnt = 0
while a >= b:
    cnt+=1
    b *= 2
while b >= c:
    cnt+=1
    c *= 2

if cnt <= k:
    print('Yes')
else:
    print('No')
# Original solution
# B
R, G, B = list(map(int, input().split()))
K = int(eval(input()))
ans = 'No'

num = 0

while (True):
    if  (num == K):
        break
        
    if (R > G):
        G *= 2
        num += 1
        
    if (R < G):
        break
    
while (True):
    if  (num == K):
        break
        
    if (G > B):
        B*= 2
        num += 1
        
    if (G < B):
        break

if (R < G and G < B):
    ans = 'Yes'
    
print(ans)

# Optimized solution
# B
R, G, B = list(map(int, input().split()))
K = int(eval(input()))
ans = 'No'

num = 0

while (True):
    if  (num == K):
        break
        
    if (R >= G):
        G *= 2
        num += 1
        
    if (R < G):
        break
    
while (True):
    if  (num == K):
        break
        
    if (G >= B):
        B *= 2
        num += 1
        
    if (G < B):
        break

if (R < G and G < B):
    ans = 'Yes'
    
print(ans)
# Original solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))


def combinations(k):
    result = []
    for b in range(k + 1):
        for c in range(k + 1 - b):
            result.append([b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for l in combinations(K):
        a, b, c = A, B, C
        b_count, c_count = l
        if b_count > 0:
            b *= 2 ** b_count
        if c_count > 0:
            c *= 2 ** c_count

        if a < b < c:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')


# Optimized solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))


def combinations(k):
    result = []
    for b in range(k + 1):
        for c in range(k + 1 - b):
            result.append([b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for b_count, c_count in combinations(K):
        a, b, c = A, B, C
        if b_count > 0:
            b *= 2 ** b_count
        if c_count > 0:
            c *= 2 ** c_count

        if a < b < c:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')
# Original solution
A,B,C = list(map(int, input().split()))
K = int(eval(input()))

for i in range(K):
  if B >= C or  A >= C:
    C *= 2
  else:
    if A >= B:
      B *= 2
if C > B and B > A:
  print("Yes")
else:
  print("No")

# Optimized solution
A,B,C = list(map(int, input().split()))
K = int(eval(input()))

cnt = 0
while (A >= B):
  B *= 2
  cnt += 1
while(B >= C):
  C *= 2
  cnt += 1
if cnt <= K:
  print("Yes")
else:
  print("No")
# Original solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))


# C > B > A
for i in range(K):
    if C >= B and B > A:
        # C > B > A
        C = C * 2
    elif C >= A and A >= B:
        # C > A >= B
        B = B * 2
    elif (
        (A >= B and B >= C)
        or (B >= A and A >= C)
        or (A >= C and C >= B)
        or (B >= C and C >= A)
    ):
        # A > B > C, B > A > C, A > C > B, B > C > A
        C = C * 2

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

# Optimized solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))


# C > B > A
for i in range(K):
    if C >= A and A >= B:
        # C >= A >= B
        B = B * 2
    else:
        C = C * 2

if C > B and B > A:
    print("Yes")
else:
    print("No")
# Original solution
import copy
def magic(arr,i,k):
  if(k==0):
    if(arr[0] < arr[1] and arr[1] < arr[2]):
      return True
    else:
      return False
  k-=1
  arr[i]*=2
  return magic(arr.copy(),0,k) or magic(arr.copy(),1,k) or magic(arr.copy(),2,k)
  
if __name__ == "__main__":
  arr = list(map(int,input().split()))
  k = int(eval(input()))
  if(magic(arr.copy(),0,k) or magic(arr.copy(),1,k) or magic(arr.copy(),2,k)):
    print("Yes")
    exit()
  else:
    print("No")

# Optimized solution
a,b,c = list(map(int,input().split()))
k = int(eval(input()))

for i in range(k):
  if(a >= b):
    b*=2
    continue
  if(b >= c):
    c*=2
    continue
    
if(a<b and b<c):
  print("Yes")
  exit()
else:
  print("No")
# Original solution
#-------------
A,B,C = list(map(int, input().split()))
K = int(eval(input()))
#-------------
 
while True :
  if A > B :
    B = B*2
    K -= 1
  if B > C :
    C = C*2
    K -= 1
  if K == 0 :
    break

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

# Optimized solution
#-------------
A,B,C = list(map(int, input().split()))
K = int(eval(input()))
#-------------
card = []
for i in range(K):
  B_x = B*(2**i)
  C_x = C*(2**(K-i))
  card.append([A,B_x,C_x])

cnt = 0
for i in range(len(card)):
  if card[i][2] > card[i][1] > card[i][0] :
    cnt +=1

if cnt >= 1:
  print("Yes")
else:
  print("No")
# Original solution
a,b,c = list(map(int, input().split()))
k = int(eval(input()))

while k:
    if a>=b:
        b *= 2
        k -= 1
    elif b>=c:
        c *= 2
        k -= 1

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



# Optimized solution
a,b,c = list(map(int, input().split()))
k = int(eval(input()))

while k:
    if a>=b:
        b *= 2
        k -= 1
    elif b>=c:
        c *= 2
        k -= 1
    else:
        break

if a<b and b<c:
    print("Yes")
else:
    print("No")
# Original solution
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))



def main():
    count = 0
    A,B,C = inpl()
    K = int(eval(input()))
    while True:
        if A < B < C:
            print('Yes')
            return
        if B < A:
            B *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
        if C < B:
            C *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
main()


# Optimized solution
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))



def main():
    count = 0
    A,B,C = inpl()
    K = int(eval(input()))
    for i in range(K+1):
        for j in range(K+1-i):
            k = K-i-j
            a = A*(2**i)
            b = B*(2**j)
            c = C*(2**k)
            if a < b < c:
                print('Yes')
                return

    print('No')
    """while True:
        if A < B < C:
            print('Yes')
            return
        if B < A:
            B *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
        if C < B:
            C *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return"""
main()
# Original solution
#!/usr/bin/env python

ta, tb, tc = list(map(int, input().split()))
k = int(eval(input()))

def dfs(s):
    a = ta
    b = tb
    c = tc
    if len(s) == k:
        #print(s)
        for i in range(k):
            if 'A' == s[i]:
                a *= 2
            elif 'B' == s[i]:
                b *= 2
            elif 'C' == s[i]:
                c *= 2
        if c > b > a:
            print('Yes')
            exit(0)
        return
    dfs(s+'A')
    dfs(s+'B')
    dfs(s+'C')

dfs('')

print('No')


# Optimized solution
#!/usr/bin/env python

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

t = 0 
while a>=b:
    b *= 2
    t += 1
while b>=c:
    c *= 2
    t += 1

if t<=k:
    print('Yes')
else:
    print('No')
# Original solution
import math
A, B, C = list(map(int, input().split()))
K = int(eval(input()))
x = 0
if A < B < C:
  print("Yes")
if A >= B:
  x = math.ceil(math.log(A/B, 2))
  B =B*(2**x)
  if A != B:
    if x > K:
      print("No")
    elif B < C:
      print("Yes")
  else:
    x += 1
    B = B*2
if B >= C:
  y = math.ceil(math.log(B/C, 2))
  C = C*(2**y)
  if B != C:
    if x+y > K:
      print("No")
    else:
      print("Yes")
  else:
    y += 1
    if x+y > K:
      print("No")
    else:
      print("Yes")

# Optimized solution
A, B, C = list(map(int, input().split()))
K = int(eval(input()))
i = 0
while A >= B:
  B *= 2
  i += 1
while B >= C:
  C *= 2
  i += 1
if i > K:
  print("No")
else:
  print("Yes")
# Original solution
m = int(eval(input()))
def calc(m):
    for h in range(1, 3500):
        for n in range(1, 3500):
            for w in range(1, 3500):
                if 4 * h * n * w == m * (w * n + w * h  + h * n):
                    return h, n, w
print(('{0[0]} {0[1]} {0[2]}'.format(calc(m))))

# Optimized solution
N = int(eval(input()))
def calc(N):
    for h in range(1, 3500):
        for n in range(1, 3500):
            if 4 * h * n - N * n - N * h > 0 and (N * h * n) % (4 * h * n - N * n - N * h) == 0:
                w = (N * h * n) / (4 * h * n - N * n - N * h)
                return h, n, int(w)
print(('{0[0]} {0[1]} {0[2]}'.format(calc(N))))
# Original solution
N=int(eval(input()))
s=False
for i in range(1,3501):
    for j in range(1,3501):
        if (4*i*j-N*i-N*j)==0:
            continue
        else:
            w=(N*i*j)/(4*i*j-N*i-N*j)
            if w%1==0 and w>0:
                p=i
                q=j
                s=True
                break
            else:
                continue
    if s==True:
        break

print(("{} {} {}".format(p,q,int(w))))


# Optimized solution
N=int(eval(input()))
s=False
for i in range(1,3501):
    for j in range(1,3501):
        if (4*i*j-N*i-N*j)>0:
            w=(N*i*j)/(4*i*j-N*i-N*j)
            if w%1==0:
                p=i
                q=j
                s=True
                break
    if s==True:
        break

print(("{} {} {}".format(p,q,int(w))))
# Original solution
def c_4_over_n(N):
    for h in range(1, 3501):
        for n in range(1, 3501):
            # 条件式をwについて整理したときの分子と分母
            numerator = N * h * n
            denominator = 4 * h * n - N * n - N * h
            if denominator > 0 and numerator % denominator == 0:
                w = numerator // denominator
            else:
                continue
            if 1 <= w <= 3500:
                ans = '{0} {1} {2}'.format(h, n, w)
                return ans
    return None

N = int(eval(input()))
print((c_4_over_n(N)))

# Optimized solution
def c_4_over_n(N):
    for h in range(1, 3501):
        for n in range(1, h + 1):
            # 条件式をwについて整理したときの分子と分母
            numerator = N * h * n
            denominator = 4 * h * n - N * n - N * h
            # このときwが正整数になる
            if denominator > 0 and numerator % denominator == 0:
                w = numerator // denominator
                # 分母の値が小さなもの順に表示する(趣味)
                ans = '{0} {1} {2}'.format(*sorted([h, n, w]))
                return ans
    return None

N = int(eval(input()))
print((c_4_over_n(N)))
# Original solution
n=int(eval(input()))
mod=10**9+7
fra=[1]*(n+2)
inv=[1]*(n+2)
t1=1
t2=1
for i in range(1,n+2):
    t1*=i
    t1%=mod
    t2*=pow(i,mod-2,mod)
    t2%=mod
    fra[i]=t1
    inv[i]=t2
ans=fra[n]
for i in range((n+1)//2,n):
    ans-=fra[i-1]*inv[2*i-n]*fra[i]%mod
    ans%=mod
print(ans)

# Optimized solution
n=int(eval(input()))
mod=10**9+7
fra=[1]*(n+2)
inv=[1]*(n+2)
t=1
for i in range(1,n+2):
    t*=i
    t%=mod
    fra[i]=t
t=pow(fra[n+1],mod-2,mod)
for i in range(n+1,0,-1):
    inv[i]=t
    t*=i
    t%=mod
ans=fra[n]
for i in range((n+1)//2,n):
    ans-=fra[i-1]*inv[2*i-n]*fra[i]%mod
    ans%=mod
print(ans)
# Original solution
# seishin.py
N = int(eval(input()))
MOD = 10**9 + 7

fact = [1]*(N+1)
rfact = [1]*(N+1)

for i in range(1, N+1):
    fact[i] = r = i*fact[i-1] % MOD
    rfact[i] = pow(r, MOD-2, MOD)

ans = 0
cnt = 0
for K in range(1, N):
    if not K >= N-K >= 1:
        continue
    res = fact[K]*fact[K-1]*rfact[2*K-N] % MOD
    ans += (res - cnt) * K % MOD
    cnt = res
    ans %= MOD
print(ans)

# Optimized solution
# seishin.py
N = int(eval(input()))
MOD = 10**9 + 7

fact = [1]*(N+1)
rfact = [1]*(N+1)

for i in range(1, N+1):
    fact[i] = r = i*fact[i-1] % MOD
    rfact[i] = pow(r, MOD-2, MOD)

ans = cnt = 0
for K in range((N+1)//2, N):
    res = fact[K]*fact[K-1]*rfact[2*K-N] % MOD
    ans += (res - cnt) * K % MOD
    cnt = res
    ans %= MOD
print(ans)
# Original solution
# seishin.py
N = int(eval(input()))
MOD = 10**9 + 7

fact = [1]*(N+1)

for i in range(1, N+1):
    fact[i] = r = i*fact[i-1] % MOD

ans = cnt = 0
for K in range((N+1)//2, N):
    res = fact[K]*fact[K-1]*pow(fact[2*K-N], MOD-2, MOD) % MOD
    ans += (res - cnt) * K % MOD
    cnt = res
    ans %= MOD
print(ans)


# Optimized solution
N = int(eval(input()))
MOD = 10**9 + 7

fact = [1]*(N+1)

for i in range(1, N+1):
    fact[i] = r = i*fact[i-1] % MOD

cnts = [0]*(N+1)
rev = 1
for K in range(N-1, (N+1)//2-1, -1):
    cnts[K] = fact[K]*fact[K-1]*rev % MOD
    rev = rev * (2*K-N) * (2*K-N-1) % MOD

ans = 0
for K in range((N+1)//2, N):
    ans += (cnts[K] - cnts[K-1]) * K % MOD
    ans %= MOD
ans = (ans * pow(fact[N-2], MOD-2, MOD)) % MOD
print(ans)
# Original solution
Md,MN=1000000007,1000006
fac,ifac,a,res,inv=[1,1],[1,1],[0],0,[1,1]
for i in range(2,MN):
    inv.append(inv[Md%i]*(Md-Md//i)%Md)
    fac.append(fac[-1]*i%Md)
    ifac.append(ifac[-1]*inv[i]%Md)
def C(x,y):
    if(x<y):
        return 0
    return fac[x]*ifac[y]*ifac[x-y]
def D(x,y):
    return C(x-y+1,y)

n=int(eval(input()))
for i in range(1,n):
    if i*2-n>=0:
        a.append(D(n-3,n-i-1)*fac[i]*fac[n-i-1]%Md)
    else:
        a.append(0)
for i in range(n-1,0,-1):
    a[i]=(a[i]-a[i-1])%Md
    res=res+a[i]*i
res=res%Md
print(res)


# Optimized solution
Md,MN=1000000007,1000006
fac,ifac,a,res,inv=[1,1],[1,1],[0],0,[1,1]
for i in range(2,MN):
    inv.append(inv[Md%i]*(Md-Md//i)%Md)
    fac.append(fac[-1]*i%Md)
    ifac.append(ifac[-1]*inv[i]%Md)
n=int(eval(input()))
for i in range(1,n):
    if i*2-n>=0:
        a.append(fac[i-1]*ifac[i+i-n]*fac[i]%Md)
    else:
        a.append(0)
for i in range(n-1,0,-1):
    a[i]=(a[i]-a[i-1])%Md
    res+=a[i]*i
res=res%Md
print(res)
# Original solution
n = int(eval(input()))
p = 10**9 + 7

def fact(n):
    n_ = 1
    yield n_
    for i in range(1, n+1):
         n_ = (n_*i) % p
         yield n_

def invfact(n, f, p):
    for i in range(n):
        yield pow(f[i], p-2, p)

ans = 0
m = n - 1
f = list(fact(m))
rf = list(invfact(n, f, p))
perm = 0

for k in range((n+1)//2, n):
    b = m - k
    a = (m - 1) - (2 * b)
    perm_ = f[a+b] * rf[a] %p * f[k] % p
    ans += (perm_ - perm) %p * k % p
    ans %= p
    perm = perm_

print(ans)

# Optimized solution
n = int(eval(input()))
p = 10**9 + 7

def fact(n):
    n_ = 1
    yield n_
    for i in range(1, n+1):
         n_ = (n_*i) % p
         yield n_

def invfact(n, f, p):
    m = pow(f[n], p-2, p)
    yield m
    for i in range(n, 0, -1):
        m = m * i % p
        yield m

ans = 0
m = n - 1
f = list(fact(m))
rf = list(invfact(m, f, p))
rf.reverse()
perm = 0

for k in range((n+1)//2, n):
    b = m - k
    a = (m - 1) - (2 * b)
    perm_ = f[a+b] * rf[a] %p * f[k] % p
    ans += (perm_ - perm) %p * k % p
    ans %= p
    perm = perm_

print(ans)
# Original solution
n = int(eval(input()))
p = 10**9 + 7

def fact(n):
    n_ = 1
    yield n_
    for i in range(1, n+1):
         n_ = (n_*i) % p
         yield n_

def invfact(n, f, p):
    m = pow(f[n], p-2, p)
    yield m
    for i in range(n, 0, -1):
        m = m * i % p
        yield m

ans = 0
m = n - 1
f = list(fact(m))
rf = list(invfact(m, f, p))
rf.reverse()
perm = 0

for k in range((n+1)//2, n):
    b = m - k
    a = (m - 1) - (2 * b)
    perm_ = f[a+b] * rf[a] %p * f[k] % p
    ans += (perm_ - perm) %p * k % p
    ans %= p
    perm = perm_

print(ans)

# Optimized solution
n = int(eval(input()))
p = 10**9 + 7

def fact(n):
    n_ = 1
    yield n_
    for i in range(1, n+1):
         n_ = (n_*i) % p
         yield n_

def invfact(n, f, p):
    m = pow(f[n], p-2, p)
    yield m
    for i in range(n, 0, -1):
        m = m * i % p
        yield m

ans = 0
m = n - 1
f = list(fact(m))
rf = list(invfact(m, f, p))
rf.reverse()
perm = 0

for k in range((n+1)//2, n):
    perm_ = f[k-1] * rf[2*k-n] %p * f[k] % p
    ans += (perm_ - perm) %p * k % p
    ans %= p
    perm = perm_

print(ans)