One rainy gloomy evening when all modules hid in the nearby cafes to drink hot energetic cocktails, the Hexadecimal virus decided to fly over the Mainframe to look for a Great Idea. And she has found one!Why not make her own Codeforces, with blackjack and other really cool stuff? Many people will surely be willing to visit this splendid shrine of high culture.In Mainframe a standard pack of 52 cards is used to play blackjack. The pack contains cards of 13 values: 2, 3, 4, 5, 6, 7, 8, 9, 10, jacks, queens, kings and aces. Each value also exists in one of four suits: hearts, diamonds, clubs and spades. Also, each card earns some value in points assigned to it: cards with value from two to ten earn from 2 to 10 points, correspondingly. An ace can either earn 1 or 11, whatever the player wishes. The picture cards (king, queen and jack) earn 10 points. The number of points a card earns does not depend on the suit. The rules of the game are very simple. The player gets two cards, if the sum of points of those cards equals n, then the player wins, otherwise the player loses.The player has already got the first card, it's the queen of spades. To evaluate chances for victory, you should determine how many ways there are to get the second card so that the sum of points exactly equals n.

The only line contains n (1 ≤ n ≤ 25) — the required sum of points.

Print the numbers of ways to get the second card in the required way if the first card is the queen of spades.

NoteIn the first sample only four two's of different suits can earn the required sum of points.In the second sample we can use all tens, jacks, queens and kings; overall it's 15 cards, as the queen of spades (as any other card) is only present once in the pack of cards and it's already in use.In the third sample there is no card, that would add a zero to the current ten points.

n=int(input())
n-=10
if(n<=0 or n>11):
    print(0)
elif(n==10):
    print(15)
else:
    print(4)

n = input()
req = n - 10
ans =0
if req <= 0:
	pass
else:
	if req <= 9 or req == 11:
		ans = 4
	if req == 10:
		ans = 15
print ans

n = input()
if n <= 10:
    print 0
elif n == 20:
    print 15
elif n >= 22:
    print 0
else:
    print 4

# import sys
# sys.stdin=open("input.in","r")
n=int(input())
if n<=10 or n>=22:
	print(0)
elif n==20:
	print(15)
else:
	print(4)

n=int(input())
if 10<n<=21:
    if n==20:
        print(15)
    else:
        print(4)
else:
    print(0)

N = int(input()) - 10
Counter = 0
if N <= 0 or N > 11:
    print(0)
    exit()
if N == 10:
    print(15)
else:
    print(4)

n=int(input())
x=n-10
if x<=0 or x>11:
    print("0")
elif((x>=1 and x<=9) or x==11):
    print("4")
else:
    print("15")

inputs = int(input())
inputs-=10
answer = "0"
if (inputs > 0 and inputs < 10) or inputs==11:
    answer = "4"
elif inputs == 10:
    answer = "15"
print(answer)

n=int(input())
li={}
li[10]=15
card=n-10
if card<=0:
    print(0)
elif card>11:
    print(0)
elif card==10:
    print(15)
else:
    print(4)

#!/usr/bin
n = int(raw_input())
if n <= 10 or n > 21:
    print 0
elif n == 20:
    print 15
else: print 4

n = int(input())
if n <= 10 or n > 21:
    print(0)
elif n == 21 or n == 11:
    print(4)
elif n == 20:
    print(15)
else:
    print(4)

import sys

input = lambda: sys.stdin.readline().strip("\r\n")

n = int(input())
n -= 10
if 1 < n < 10:
    print(4)
elif n == 1 or n == 11:
    print(4)
elif n == 10:
    print(15)
else:
    print(0)

#!/usr/bin/env python
n = input()
if n <= 10:
    print 0
elif n == 20:
    print 15
elif n >= 22:
    print 0
else:
    print 4

N=input()-10
if N>=1 and N<=11:
	if N==10:
		print 15
	else:
		print 4
else:
	print 0

n = input()
r = n - 10
if r>=1 and r<=11:
	if r==10:
		print 15
	else:
		print 4
else:
	print 0

def solve(n):
    d = n-10
    if d <= 0 or d > 11: return 0
    if d > 0 and d < 10: return 4
    if d == 11: return 4
    if d == 10: return 15

print solve(int(raw_input()))

# -*- coding: utf-8 -*-
import sys
if __name__ == '__main__':

    num = map(int,sys.stdin.readline().split())
    n = num[0]
    dic={0:0,1:15,2:4}
    if n <11 or n>21:
        print dic[0]
    elif n == 20:
        print dic[1]
    else:
        print dic[2]

def solve():
    num = int(raw_input())
    if(num>21) or num<=10:
        print 0
        return
    if(num == 20):
        print 15
    else:
        print 4

solve()

import sys

n = int(input())

needed = n - 10

if needed <= 0:
    print(0)
    sys.exit(0)

if needed == 1 or (needed >= 2 and needed <= 9) or needed == 11:
    print(4)
elif needed == 10:
    print(15)
else:
    print(0)

n=int(input())
if 11<=n<=19:
    print(4)
elif n==20:
    print(15)
elif n==21:
    print(4)
else:
    print(0)

n=int(input())
n=n-10
if n>11 or n<1:
    print(0)
else:
    if n>=2 and n<10:
        print(4)
    elif n==10:
        print(15)
    elif n==1 or n==11:
        print(4)

x=input()-10
if x<=0:
  print 0
elif x==10:
  print 15
elif x>11:
  print 0
else:
  print 4

n=int(raw_input())
n-=10
if n>11:
    print 0
elif n==11 or n==1:
    print 4
elif n==10:
    print 15
elif n<=0:
    print 0
else:
    print 4

n=int(input())
left = n-10
if left==10:
    print(15)
elif left==0 or n<10 or left>11:
    print(0)
else:
    print(4)

n = input()

if n-10 > 0 and n-10 < 10:
    print 4
elif (n-10) == 10:
    print 15
elif (n-10) == 11:
    print 4
else:
    print 0

n = int(input())
n -= 10
if (n < 10 or n == 11) and n >= 1:
    print (4)
elif n < 1 or n > 11:
    print (0)
else:
    print (15)

class CodeforcesTask104ASolution:
    def __init__(self):
        self.result = ''
        self.n = 0

    def read_input(self):
        self.n = int(input())

    def process_task(self):
        deck = [[x, x, x, x] for x in range(1, 12)]
        deck.append([10 for x in range(11)])
        mdeck = []
        for d in deck:
            mdeck += d
        self.result = str(mdeck.count(self.n - 10))

    def get_result(self):
        return self.result

if __name__ == "__main__":
    Solution = CodeforcesTask104ASolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())

n = int(input())
if(n<=10 or n>21):
    print(0)
    exit(0)
x = n-10
if(x==10):
    print(15)
else:
    print(4)

n=int(raw_input())
if n<=10:
	print 0
elif n==11:
	print 4
elif n<=19:
	print 4
elif n==20:
	print 15
elif n==21:
	print 4
else:
	print 0

t = input()
if(t<=10):
	print 0
else:
	if(t>=11 and t<=19):
		print 4
	elif(t==20):
		print 15
	elif(t==21):
		print 4
	else:
	 	print 0

#!/usr/bin/env python
# -*- coding: utf-8 -*-
n = input()
if n <= 10:
    print 0
elif n == 20:
    print 15
elif n >= 22:
    print 0
else:
    print 4

n=int(input())
if n<=10 or n>=22:
    print(0)
else:
    x=n-10
    if x==1 or x==2 or x==3 or x==4 or x==4 or x==5 or x==6 or x==7 or x==8 or x==9 or x==11:
        print(4)
    elif x==10:
        print(15)
    elif x==12 or x==13 or x==14 or x==15:
        print(19)

import sys

n = int(sys.stdin.readline().strip())

if n <= 10 or n > 21:
    print(0)
elif n == 20:
    print(15)
else:
    print(4)

n = int(raw_input())
n -= 10
if n == 10:
    print 15
elif n in range(1, 12):
    print 4
else:
    print 0

n=int(input())-10;print(0if n<1 or n>11 else 4 if n!=10 else 15)

s=int(input())
if s==10:
	print(0)
elif s in range(11,20):
	print(4)
elif s==20:
	print(15)
elif s==21:
	print(4)
else:
	print(0)

n = int(input())
c = n - 10
if c == 10:
    print(15)
    exit()
elif c > 11 or c <= 0:
    print(0)
else:
    print(4)

for _ in range(1):
  n=int(input())
  if n==11 or n==21:
    print(4)
  elif n==20:
    print(15)
  elif 12<=n<=19:
    print(4)
  else:
    print(0)

import pdb
import math
R = lambda: map(int, raw_input().split())

n = input()
if n <= 10:
    print 0
else:
    re = n - 10
    if re >11:
        print 0
    else:
        if re == 10:
            print 15
        else:
            print 4

n = int(input())
if 10 >= n or n > 21:
    answer = 0
elif 10 < n <= 19 or n == 21:
    answer = 4
elif n == 20:
    answer = 15
print(answer)

target = int(raw_input())
diff = target - 10
if diff < 1 or diff > 11:
    print 0
else:
    if diff == 10:
        print 15
    else:
        print 4

def run():
    needed = int(raw_input()) - 10
    if needed <= 0 or needed > 11:
        print 0
        return
    available = [4]*12
    available[0] = 0
    available[10] = 15 #d,k,v
    #print available
    print available[needed]

if __name__ == '__main__':
    run()

n=int(raw_input())
if n<=10:
    print '0'
else:
    if (n<20):
        print '4'
    else:
        if n==20:
            print '15'
        else:
            if n==21:
                print '4'
            else:
                print '0'

n = int(input())
n -= 10
if (n < 10 or n == 11) and n >= 1:
    print (4)
elif n < 1 or n > 11:
    print (0)
else:
    print (15)

n = int(input()) - 10
if n == 1 or n == 11:
    print(4)
elif n > 1 and n < 10:
    print(4)
elif n == 10:
    print(15)
else:
    print(0)

#!/usr/bin/env python
# Codeforce 104A

import sys
n = int(sys.stdin.readline())
need = n-10
if need < 1 or need > 11:
    chance = 0
elif need == 10:
    chance = 15
else:
    chance = 4
print chance

n = input()
a = n-10
if 0<a<10:
    print 4
elif a==10:
    print 15
elif a==11:
    print 4
else:
    print 0

n=int(input())
n=n-10
if(n>=1 and n<=9):
    print(4)
elif(n==10):
    print(15)
elif(n==11):
    print(4)
else:
    print(0)

#! /usr/bin/env python
n=int(raw_input())
if n<=10 or n>21:
    print 0
else:
    if n==20:
        print 15
    else:
        print 4

n=int(input())
if n>21:
    print("0")
elif n<11:
    print("0")
elif n==11:
    print("4")
elif n==20:
    print("15")
else:
    print("4")

n=int(input())
if n>10 and n<22:
    if n==20:
        print(15)
    else:
        print(4)
else:
    print(0)

n=int(input())
if n<=10:
    print(0)
else:
    n=n-10
    if n==15 or n>11:
        print(0)
    elif n==10:
        print(15)
    else:
        print(4)

n = int(input())
if n <= 10:
    print(0)
elif n == 20:
    print(15)
elif n > 21:
    print(0)
else:
    print(4)

n = int(input())
target = n - 10
if target >= 1 and target <= 9 or target == 11:
  print(4)
elif target == 10:
  print(15)
else:
  print(0)

n=int(input())
if 11<=n<=19:
    print(4)
elif n==20:
    print(15)
elif n==21:
    print(4)
else:
    print(0)

sults = 4
cards = [0]
for i in xrange(0, 12):
	cards.append(sults)
cards[10] += sults * 3 - 1

n = int(raw_input())
first = 10
second = n - first
if (second < 0) or (second > 11):
	print 0
else:
	print cards[second]

dic = dict()
for i in range(1,10):
    dic[i]=4
dic[10]=15
dic[11]=4
dif = int(input())-10
print(dic.get(dif,0))

n = int(input())-10
if n <=0 or n>11:print(0)
elif n ==11 or n <10:print(4)
elif n==10:print(15)

n=int(input())
n-=10
if(n<=0 or n>11):
    print(0)
elif(n==10):
    print(15)
else:
    print(4)

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep  8 16:09:29 2020

@author: anirudhasarmatumuluri
"""

def main():
    n = int(input())
    if n<=10 or n>21:
        print(0)
        return
    if n==21:
        print(4)
        return
    if n==20:
        print(15)
        return

    else:
        print(4)

    return

main()

n=int(input())
if(n<=10 or n>21):
	print(0)
else:
	diff=n-10
	if(diff==10):
		print(15)
	else:
		print(4)

n=int(input())
n=n-10
if n==0:
    print(0)
elif n>0 and n<=9:
    print(4)
elif n==10:
    print(15)
elif n==11:
    print(4)
else:
    print(0)

n = int(input())
n-=10
ans=0
if (n<10 and n>0) or n==11:
	ans=4
elif n==10:
	ans=15
print(ans)

def solve(n):
    if n == 20:
        return 15
    if n == 10:
        return 0
    elif n<=21 and n>10:
        return 4
    else:
        return 0
n = int(input())
print(solve(n))

n=int(input())
x=n-10
if x<=0 or x>11:
    print("0")
elif((x>=1 and x<=9) or x==11):
    print("4")
else:
    print("15")

import math

def main():
    n = int(input())
    left = n - 10
    res = {}
    if left < 1 or left > 11:
        print(0)
    else:
        if 1 <= left <= 9 or left == 11:
            print(4)
        elif left == 10:
            print(15)

if __name__ == '__main__':
    main()

f=lambda:map(int,input().split())
n=int(input())
if 0<n-10<12:
    if n-10==0:
        print(0)
    elif n-10==10:
        print(15)
    else:
        print(4)
else:
    print(0)

def main():
    n = int(input())
    n -= 10
    if n <= 0 or n > 11:
        print(0)
    elif n < 10 or n == 11:
        print(4)
    else:
        print(15)
    return

main()

k = 10
n = int(input())
su = n - k
if (su <= 0) or (12 <= su <= 15):
    print (0)
elif (su == 10):
    print (11)
else:
    print (4)

n=int(input())
a=n-10
if 1<=a<=9:
    print('4')
elif a==10:
    print('15') #4 ten, 4 korol, 4 valeta, 3 dami
else:
    print('0')

n = int(input())

tmp = abs(10-n)

if tmp == 0 or n > 20 or n <= 10:
    print(0)
elif tmp < 10:
    print(4)
else: print(15)

n=int(input())
n-=10
if n<10:print(4)
elif n==10:print(15)
elif n==11:print(4)
else:print(0)

n = int(input())
n -= 10
if (n < 10 or n==1 or n == 11) and n > 1:
    print (4)
elif n < 1 or n > 11:
    print (0)
else:
    print (15)

n=int(input())
if n<=10 or n>=21:
    print(0)
else:
    x=n-10
    if x==1 or x==2 or x==3 or x==4 or x==4 or x==5 or x==6 or x==7 or x==8 or x==9 or x==11:
        print(4)
    elif x==10:
        print(15)
    elif x==12 or x==13 or x==14 or x==15:
        print(19)

#!/usr/bin/python3
n = int(input())
n-=10
if n <= 0 or n > 10:
    print(0)
elif n < 10:
    print(4)
elif n == 10:
    print(15)

N = int(input()) - 10
Counter = 0
if N == 0 and N>11:
    print(0)
    exit()
if N == 10:
    print(15)
else:
    print(4)

import sys
import math

#to read string
get_string = lambda: sys.stdin.readline().strip()
#to read list of integers
get_int_list = lambda: list( map(int,sys.stdin.readline().strip().split()) )
#to read non spaced string and elements are integers to list of int
get_intList_from_str = lambda: list(map(int,list(sys.stdin.readline().strip())))
#to read non spaced string and elements are character to list of character
get_charList_from_str = lambda: list(sys.stdin.readline().strip())
#get word sepetared list of character
get_char_list = lambda: sys.stdin.readline().strip().split()
#to read integers
get_int = lambda: int(sys.stdin.readline())
#to print faster
pt = lambda x: sys.stdout.write(str(x))

#--------------------------------WhiteHat010--------------------------------#
n = get_int()
if n <= 10:
    print(0)
else:
    diff = n-10
    if diff == 11:
        print(4)
    elif diff == 1:
        print(8)
    elif diff <= 9:
        print(4)
    elif diff == 10:
        print(15)
    elif diff > 11:
        print(0)

n=int(input())
left = n-10
if left==10:
    print(15)
elif left==0 or left>11:
    print(0)
else:
    print(4)

n=int(input())
n=n-10
if n==0:
    print(0)
else:
    if n>=2 and n<10:
        print(4)
    elif n==10:
        print(15)
    elif n==1 or n==11:
        print(4)

n=int(input())
x=n-10
if x==0:
    print("0")
elif x==1 or x==11:
    print("4")
elif(x>=2 and x<=9):
    print("4")
else:
    print("15")

# -*- coding: cp932 -*-

#$BF~NO$7$?$b$N$rBeF~(B
input_str = raw_input()
input_num = int(input_str)

if(input_num >= 10 and input_num <= 19):
	print 4
elif(input_num == 20):
	print 15
elif(input_num == 21):
	print 4
else:
	print 0

n=int(raw_input())
if n<=10:
	print 0
elif n==11:
	print 8
elif n<=19:
	print 4
elif n==20:
	print 15
elif n==21:
	print 4
else:
	print 0

#!/usr/bin/env python
# -*- coding: utf-8 -*-
n = input()
if n <= 10:
    print 2
elif n == 20:
    print 15
elif n >= 22:
    print 0
else:
    print 4

n=int(input())
r=n-10
if(r==10):
  print(15)
elif(r==0):
  print(0)
else:
  print(4)

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("output2.out","w")
N=int(input())
X=N-10
if X>=1 and X<=9:
	print(4)
elif X==10:
	print(15)
elif X==11:
	print(8)
elif X==0:
	print(0)
else:
	print(0)

n = int(raw_input()) - 10
if n == 10: print 15
elif n > 0 & n < 12: print 4
else: print 0

a = int(input())

if a <= 10:
	print(0)
else:
	if a == 20:
		print(15)
	else:
		print(4)

n = int(input())
kartu = 10
powarray = [1,2,3,4,5,6,7,8,9,11]
for i in range(len(powarray)):
    if(kartu + powarray[i]==n):
        print("4")
if(kartu + 10==n):
    print("15")
elif(n==10 or n>21):
    print("0")

n = int(input())
need = n-10
if need == 0 or n>21:
    print(0)
elif need == 10:
    print(15)
else:
    print(4)

n = int(raw_input())
n -= 10
if n == 11:
    print 1
elif n == 10:
    print 15
elif n in range(1, 10):
    print 4
else:
    print 0

n=int(raw_input())

n=n-10

if n==0 or n>10 or n<10:
 print 0
 exit(0)
if n==10:
 print 15
 exit(0)
print 4

n = int(input())
r = n-10
if r<=0:
    print(0)
elif r==10:
    print(15)
elif r in range(1,21):
    print(4)
else:
    print(0)

a = int(input())

if a <= 10 or a > 20:
	print(0)
else:
	if a == 20:
		print(15)
	else:
		print(4)

n = raw_input()
if n <= 10 or n>=22:
   print ("0")
else:
  if n == 20:
     print("15")
  else:
     print("4")

# -*- coding: utf-8 -*-
"""
Created on Sat Feb 22 14:50:02 2020

@author: Lenovo
"""

#https://codeforces.com/problemset/problem/104/A

def black_jack():
    card = int(input())

    needed = card - 10

    if needed >= 1 and needed <= 9:
        print(4)
        return
    elif needed == 11:
        print(1)
        return
    elif needed == 10:
        print(15)
        return
    elif needed == 0 or needed > 11 or needed <= 0:
        print(0)
        return

black_jack()

N = int(input()) - 10
Counter = 0
if N == 0 or N>11:
    print(0)
    exit()
if N == 10:
    print(15)
else:
    print(4)

from sys import stdin, stdout
def stdinhack():
  for line in stdin: yield line
next_line = lambda: next(stdinhack()).split()
write = lambda x : stdout.write(x)

def solve ():
  n = int(next_line()[0])
  a = [1,2,3,4,5,6,7,8,9,10,10,10,10]
  ans = 0
  for k in a:
    if(10+k==n): ans+=1
  for k in a:
    if(10+k==n): ans+=1
  for k in a:
    if(10+k==n): ans+=1
  for k in a[:-1]:
    if(10+k==n): ans+=1
  print(ans)
  return

if __name__ == '__main__':
  solve()

# cook your dish here
from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict

def L():
    return list(map(int, stdin.readline().split()))

def In():
    return map(int, stdin.readline().split())

def I():
    return int(stdin.readline())

P = 1000000007
arr = [0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 15, 4]
n = I()
if n-10 > 11:
    print(0)
else:
    print(arr[n-10])

x=input()-10
if x==0:
  print 0
elif x==10:
  print 15
elif x>21:
  print 0
else:
  print 4

# import sys
# sys.stdin=open("input.in","r")
n=int(input())
if n<=10 or n>=25:
	print(0)
elif n==20:
	print(15)
else:
	print(4)

import sys

input = lambda: sys.stdin.readline().strip("\r\n")

n = int(input())
n -= 10
if 1 < n < 10:
    print(4)
elif n == 1 or n == 1:
    print(4)
elif n == 10:
    print(15)
else:
    print(0)

n = int (input ())
if n<=10:
    print (0)
elif n-10==10:
    print (15)
elif n-10 == 1:
    print (8)
else:
    print (4)

n=int(input())
r=n-10
if(r==10):
  print(15)
elif(r==0):
  print(0)
else:
  print(4)

import itertools
from fractions import gcd
from math import sqrt
from bisect import bisect_left
import heapq
from collections import deque , defaultdict
from itertools import combinations as C
def Ls():
	return list(raw_input())
def get(a):
	return map(a , raw_input().split())
def Int():
	return int(raw_input())
def Str():
	return raw_input()
n = input() - 10
if n >= 2 and n <= 9:
	print 4
	exit(0)
if n == 10:
	print 15
	exit(0)
if n == 1 or n == 11:
	print 1
	exit(0)
print 0

n = int(input())

tmp = abs(10-n)

if tmp == 0 or n > 20:
    print(0)
elif tmp < 10:
    print(4)
else: print(15)

# your code goes here
n=int(input())
n-=10
if n<=0 or n>11:
	print (0)
if n==10:
	print (15)
else:
	print (4)

n=input()
x=n-10
res=0
if x>0 and x<21:
	if x==10:
		res=15
	elif x==1 or x==11:
		res=1
	else:
	    res=4
print(res)

n=int(input())
x=n-10
if x==0:
    print("0")
elif x==1 or x==11:
    print("4")
elif(x>=2 and x<=9):
    print("4")
else:
    print("15")

n = int(input()) - 10
if n <= 0 or n >= 12: print 0
elif n != 10: print 4
else: print 16

def solution(n):
    need=n-10
    if need<0:
        return 0
    else:
        a = []
        i=2
        while i<=9:
            a.append(i)
            a.append(i)
            a.append(i)
            a.append(i)
            i+=1
        while i==10:
            j=1
            while j<=15:
                a.append(10)
                j+=1
            i+=1
        while i==11:
            j=1
            while j<=4:
                a.append(11)
                j+=1
            i+=1
        ans=0
        while need in a:
            ans+=1
            a.remove(need)
        return ans

def answer():
    n=int(input())
    print(solution(n))
answer()

#!/usr/bin
n = int(raw_input())
if n <= 10 or n > 21:
    print 0
elif 12 <= n <= 19:
    print 4
elif n == 20:
    print 15
else: print 1

n=int(input())
d=n-10
if d<=0:
	print(0)
else:
	if d==10:
		print(15)
	else:
		print(4)

n = input()
n=n-10
if n<=0 or n>=12:
	print 0
elif n>=1 or n<=9:
	print 4
elif n==10:
	print 15
elif n==11:
	print 4

n = int(raw_input())
if n<=10 or n>=21:
	print 0
else :
	if n==20 :
		print 15
	else :
		print 4

n = input()

n = n-10

if n==11 or n==1:
    print(4)
elif n==10:
    print(15)
elif n==0:
    print(0)
elif n>11:
    print(0)
else:
    print(4)

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import time
import sys, io
import re, math
#start = time.clock()
n=int(raw_input())
#l=[int(x) for x in raw_input().split()]
if n<=10:
    print 0
elif n>=11 and n<=19:
    print 4
elif n==20:
    print 15
else:
    print 4

N=input()-10
if N>=2 and N<=11:
	if N==10:
		print 15
	else:
		print 4
else:
	print 0

n=int(input())
a=n-10
if 1<=a<=9:
    print('4')
elif a==10:
    print('15') #4 ten, 4 korol, 4 valeta, 3 dami
else:
    print('0')

n=int(input())
n=n-10
if n==1 or n==11:
	print(8)
elif n==10:
	print(15)
elif n<=0 or n>=12:
	print(0)
else:
	print(1)

n = int(input())
kartu = 10
powarray = [1,2,3,4,5,6,7,8,9,11]
for i in range(len(powarray)):
    if(kartu + powarray[i]==n):
        print("4")
if(kartu + 10==n):
    print("15")
elif(n==10 or n>11):
    print("0")

n=input()
x=n-10
res=0
if x>0 and x<21:
	if x==10:
		res=15
	else:
	    res=4
print(res)

n=int(raw_input())

n=n-10

if n==0 or n>10:
 print 0
 exit(0)
if n==10:
 print 15
 exit(0)
print 4

n=int(raw_input())

n=n-10

if n==0 or n>10 or n<10:
 print 0
 exit(0)
if n==10:
 print 15
 exit(0)
print 4

# your code goes here
n=int(input())
n-=10
if n<=0 or n>12:
	print (0)
if n==10:
	print (15)
else:
	print (4)

a = int(input())

if a <= 10 or a > 20:
	print(0)
else:
	if a == 20:
		print(15)
	else:
		print(4)

n=int(raw_input())

n=n-10

if n==0:
 print 0
 exit(0)
if n==10:
 print 15
 exit(0)
print 4

num = int(input())
d = num - 10
if d > 11 or d == 0:
    print(0)
elif d == 10:
    print(15)
else:
    print(4)

N = int(input()) - 10
Counter = 0
if N == 0:
    print(0)
    exit()
if N == 10:
    print(15)
else:
    print(4)

n=int(input())
left = n-10
if left==10:
    print(15)
elif left==0:
    print(0)
else:
    print(4)

n = int(input())
n = n-10
if n<=0:print(0)
elif n>10:print(0)
elif n==1: print(4)
elif n==10:print(15)
else:
    print(4)

"""  *** Author--Saket Saumya ***
            IIITM
"""
import math
from sys import stdin

def si():
	return str(input())
def ii():
    return int(input())
def mi():
    return map(int, input().split())
def li():
    return list(mi())

n=ii()
s=n-10
if s==0:
	print('0')
if(s==1) or s==2 or s==3 or s==4 or s==5 or s==6 or s==7 or s==8 or s==9:
	print('4')
if(s==10):
	print('15')
if s==11:
	print('4')

n = int(input())

tmp = abs(10-n)

if tmp == 0 or n > 21 or n <= 10:
    print(0)
elif tmp < 10:
    print(4)
else: print(15)

n=int(input())
left = n-10
if left==10:
    print(15)
elif left==0 or left>11:
    print(0)
else:
    print(4)

n=int(input())
d=n-10
if((d>=1 and d<=9) or (d==11)):
    num=4
elif(d==0):
    num=0
else:
    num=15
print(num)

n= int(input())
if n<=10 or n>21:
  print 0
if n==20:
  print 15
else:
  print 4

#A. Blackjack
n = int(input())
req = n-10
if req == 0:
    print(0)
elif req<=9 or req==11:
    print(4)
elif req==10:
    print(15)
else:
    print(0)

p = input()

if p <= 10 or p > 21:
	print 0
elif p < 19:
	print 4
elif p == 20:
	print 15
elif p == 21:
	print 4

n=input()
x=n-10
res=0
if x>0 and x<11:
	if x==10:
		res=15
	elif x==1 or x==11:
		res=1
	else:
	    res=4
print(res)

n=int(input())
r=n-10
if(r==10):
  print(15)
elif(r==0 or r>11):
  print(0)
else:
  print(4)

n = int(input())
n -= 10
if n >= 1 and n <= 9:
    print(4)
elif n == 10:
    print(15)
else:
    print(0);

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("output2.out","w")
N=int(input())
X=N-10
if X>=1 and X<=9:
	print(4)
elif X==10:
	print(15)
elif X==11:
	print(8)
elif X==0:
	print(0)
elif X>13:
	print(0)
else:
	print(4)

n = int(input()) - 10
if n == 1 or n == 11:
    print(1)
elif n > 1 and n < 10:
    print(4)
elif n == 10:
    print(15)
else:
    print(0)

x=input()-10
if x==0:
  print 0
elif x==10:
  print 15
elif x>21:
  print 0
else:
  print 4

n = int(input())
need = n-10
if need == 0 or n>21:
    print(0)
elif need == 10:
    print(15)
else:
    print(4)

n = int(input())

diff = n - 10

if diff>=10:
    print(0)
elif diff>10 and diff<20:
    print(4)
elif diff==20:
    print(15)
else:
    print(4)

n = int (input ())
if n<=10:
    print (0)
elif n-10==10:
    print (15)
else:
    print (4)

n = int(input()) - 10
if n <= 0 or n >= 12:
    print 0
elif n != 10:
    print 4
else: print 12

n=input()
if n<=10 or n>21:
    print 0

if 19>=n>=12:
    print 4
if n==20:
    print 15


Seven boys and seven girls from Athens were brought before King Minos. The evil king laughed and said "I hope you enjoy your stay in Crete".With a loud clang, the doors behind them shut, and darkness reigned. The terrified children huddled together. In the distance they heard a bellowing, unholy roar.Bravely, they advanced forward, to their doom.

$$$n$$$ ($$$1 \le n \le 100$$$) — the dimensions of the labyrinth.  Each of the next $$$n$$$ lines contains a string of lowercase English letters of length $$$n$$$.

10
atzxcodera
mzhappyayc
mineodteri
trxesonaac
mtollexcxc
hjikeoutlc
eascripsni
rgvymnjcxm
onzazwswwg
geothermal

import random
n = random.randint(0,100)
if n % 2 == 0:
    print("YES")
else:
    print("NO" )

import random
n = int(input())
for i in range(0,n):
    s = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

def transpose(matrix):
    rows = len(matrix)
    columns = len(matrix[0])

    matrix_T = []
    for j in range(columns):
        row = []
        for i in range(rows):
           row.append(matrix[i][j])
        matrix_T.append(row)

    return matrix_T

def calc_diagonais(matrix):
    res = []
    for i in range(n):
        res.append("")
        j = 0
        while(i + j < n):
            res[-1] += matrix[j][i + j]
            j += 1

        res.append("")
        j = 0
        while(i + j < n):
            res[-1] += matrix[i + j][j]
            j += 1

    return res[1:]

n = int(input())
labirinto = []

for i in range(n):
    labirinto.append(input())

linhas = '|'.join([w + w for w in labirinto])

transposto = [''.join(palavra) for palavra in transpose(labirinto)]

colunas = '|'.join([w + w for w in transposto])

invertido = [palavra[::-1] for palavra in labirinto]

diagonais = '|'.join([w + w for w in calc_diagonais(labirinto)])
diagonais_invertidas = '|'.join([w + w for w in calc_diagonais(invertido)])

# print(linhas)
# print(colunas)
# print(diagonais)
# print(diagonais_invertidas)

def achou(palavra):
    return palavra in linhas or palavra in colunas or palavra in diagonais or palavra in diagonais_invertidas

if not achou('theseus'): #or achou('ruatonim'):
    print('NO')
else:
    print('YES')

# ruatonimoo
# mzhappyaym
# mineodteri
# trxesonaan
# mtollexcxo
# hjikeoutlt
# eascripsne
# rgvymnjcxu
# onzazwswwr
# geothermal

n = int(input())
s = [input().strip() for _ in range(n)]
w = "theseus"
ans = False
for i in range(n):
  for j in range(n):
    for di, dj in (1, 0), (0, 1), (1, 1):
      ok = True
      for k in range(len(w)):
        ok &= 0 <= i + k * di < n and 0 <= j + k * dj < n and s[i + k * di][j + k * dj] == w[k]
      ans |= ok
if ans:
  print("YES")
else:
  print("NO")

from sys import exit

def check(S):
    for s in S:
        if "theseus" in s:
            print("Yes")
            exit(0)

N = int(input())

S = [input() for i in range(N)]
check(S)

S1 = [''.join(S[i][j] for i in range(N)) for j in range(N)]
check(S1)

S2 = [''.join(S[i + j][i] for i in range(N - j)) for j in range(N)]
check(S2)

S3 = [''.join(S[i - j][i] for i in range(N - j)) for j in range(N)]
check(S3)

print("No")

n = int(input())
kek = []
for _ in range(n):
    s = input()
    kek.append(s)
t = "theseus"
for s in kek:
    if s.find(t) != -1:
        print("YES")
        exit(0)
for i in range(n - len(t)):
    for j in range(n):
        ss = ""
        for i0 in range(i, i + len(t)):
            ss += kek[i0][j]
        if ss == t:
            print("YES")
            exit(0)
for i in range(n - len(t)):
    for j in range(n - len(t)):
        ss = ""
        for d in range(len(t)):
            ss += kek[i + d][j + d]
        if ss == t:
            print("YES")
            exit(0)
print("NO")

def main():
	n = int(input())
	a = [input() for _ in range(n)]

	for i in range(n):
		for j in range(n - 7):
			if a[i][j : j+7] == "theseus":
				print("YES")
				return
	for j in range(n):
		for i in range(n - 7):
			s = "".join([a[i+k][j] for k in range(7)])
			if s == "theseus":
				print("YES")
				return
	for i in range(n - 7):
		for j in range(n - 7):
			s = "".join([a[i+k][j+k] for k in range(7)])
			if s == "theseus":
				print("YES")
				return
	for i in range(n - 7):
		for j in range(6, n):
			s = "".join([a[i+k][j-k] for k in range(7)])
			if s == "theseus":
				print("YES")
				return
	print("NO")

main()

import random
k = 1
print("YES" if random.randint(k, k + 4636)% 2 else "NO")
0

import random
if random.choice([1,2])==2:
 print("YES")
else:
 print("NO")

import time

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

def contains(s):
	for di in (1,):
		for dj in (1,):
			if di == dj == 0:
				continue

			for i0 in range(n):
				for j0 in range(n):
					if 0 <= i0 + di * (len(s) - 1) < n and 0 <= j0 + dj * (len(s) - 1) < n:
						s1 = "".join(a[i0 + di * k][j0 + dj * k] for k, c in enumerate(s))
						if s1 == s:
							return True

	return False

if contains("theseus"):
	print("YES")
else:
	print("NO")

import random

print("YES" if random.randint(0, 100) % 2 else "NO")

from collections import defaultdict
n = int(input())
g = [input() for _ in range(n)]
strs = defaultdict(list)
for i in range(n):
    for j in range(n):
        strs[(0, i)].append(g[i][j])
        strs[(1, j)].append(g[i][j])
        strs[(2, i+j)].append(g[i][j])
        strs[(3, i-j)].append(g[i][j])
good = any('theseus' in s or 'theseus' in s for s in map(''.join, strs.values()))
print('YES' if good else 'NO')

import sys
from collections import deque
from typing import List

class Solution:
    # Direction vectors
    direction_row = [ 1, 0,  1 ]
    direction_column = [ 0, 1, 1 ]
    pattern = ['t', 'h', 'e', 's', 'e', 'u', 's']

    def find(self, letters: List[List[str]], start_points):
        self.num_rows = len(letters)
        self.num_columns = self.num_rows
        found = False
        for point in start_points:
            found = self.search_prince(letters, point)
            if found:
                return True
        return False

    def search_prince(self, letters, start):
        stack = deque()
        stack.append(start)
        visited = set()

        dir_index = 0
        index = 0

        while len(stack) > 0:
            cell = stack.popleft()

            if (cell[0], cell[1]) in visited:
                continue
            visited.add((cell[0], cell[1]))

            if letters[cell[0]][cell[1]] == self.pattern[index]:
                index += 1
                if index == len(self.pattern):
                    return True
            else:
                index = 0
                dir_index += 1
                if dir_index == 3:
                    return False
                stack = deque()
                stack.append(start)
                visited.remove(start)
                continue

            for i in range(8):
                if dir_index == i:
                    next_cell = (cell[0] + self.direction_row[dir_index], cell[1] + self.direction_column[dir_index])
                    if self.valid_cell(next_cell[0], next_cell[1]) and (next_cell[0], next_cell[1]) not in visited:
                        stack.append(next_cell)
                    else:
                        dir_index += 1
                        if dir_index == 3:
                            return False
                        index = 0
                        stack = deque()
                        stack.append(start)
                        if start in visited:
                            visited.remove(start)

    def valid_cell(self, row, column):
        if row < 0 or column < 0  or row >= self.num_rows or column >= self.num_columns:
            return False
        return True

if __name__ == '__main__':
    codeforce = Solution()
    maze_size = int(sys.stdin.readline())
    letters = []
    start_points = []
    line_num = 0
    for line in sys.stdin.readlines():
        letters.append(list(line[:-1]))
        position = 0
        for char in letters[-1]:
            if char == 't':
                start_points.append((line_num, position))
            position += 1
        position = 0
        line_num += 1
        if line_num == maze_size:
            break

    if len(start_points) > 0 and codeforce.find(letters, start_points):
        print('YES')
        sys.exit(0)
    print('NO')

n=int(input())
b=[0 for _ in range(n)]
for i in range(n):
    b[i]=input()
tw="theseus"
m=len(tw)
def solve():
    for i in range(n):
        x=0
        y=0
        for j in range(n):
            if b[i][j]==tw[x]:
                x+=1
                if x==m:
                    return True
            else:
                x=0
            if b[j][i]==tw[y]:
                y+=1
                if y==m:
                    return True
            else:
                y=0
    for i in range(n-m+1):
        x=0
        y=0
        for j in range(n-i):
            if b[i+j][j]==tw[x]:
                x+=1
                if x==m:
                    return True
            else:
                x=0
            if b[j][i+j]==tw[y]:
                y+=1
                if y==m:
                    return True
            else:
                y=0
    return False

if solve():
    print("YES")
else:
    print("NO")

print("YES" if (lambda x: any([y.find('theseus') != -1 for y in x + (lambda x: [(lambda x, p: ''.join([y[p] for y in x if len(y) > p]))(x, i) for i in range(len(x[0]))])(x) + (lambda x: [(lambda x, p: ''.join([y[p] for y in x if len(y) > p]))(x, i) for i in range(len(x[0]))])((lambda x: [y[i:] for i, y in enumerate(x)])(x))]))((lambda n: [input() for _ in range(n)])(int(input()))) else "NO")

import sys
import math
import heapq
import bisect
from collections import Counter
from collections import defaultdict
from io import BytesIO, IOBase
from itertools import permutations
import string

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
        self.BUFSIZE = 8192

    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def get_int():
    return int(input())

def get_ints():
    return list(map(int, input().split(' ')))

def get_int_grid(n):
    return [get_ints() for _ in range(n)]

def get_str():
    return input().strip()

def get_strs():
    return get_str().split(' ')

def flat_list(arr):
    return [item for subarr in arr for item in subarr]

def yes_no(b):
    if b:
        return "YES"
    else:
        return "NO"

def binary_search(good, left, right, delta=1, right_true=False):
    """
    Performs binary search
    ----------
    Parameters
    ----------
    :param good: Function used to perform the binary search
    :param left: Starting value of left limit
    :param right: Starting value of the right limit
    :param delta: Margin of error, defaults value of 1 for integer binary search
    :param right_true: Boolean, for whether the right limit is the true invariant
    :return: Returns the most extremal value interval [left, right] which is good function evaluates to True,
            alternatively returns False if no such value found
    """

    limits = [left, right]
    while limits[1] - limits[0] > delta:
        if delta == 1:
            mid = sum(limits) // 2
        else:
            mid = sum(limits) / 2
        if good(mid):
            limits[int(right_true)] = mid
        else:
            limits[int(~right_true)] = mid
    if good(limits[int(right_true)]):
        return limits[int(right_true)]
    else:
        return False

def prefix_sums(a):
    p = [0]
    for x in a:
        p.append(p[-1] + x)
    return p

def solve_a():
    return "BucketPotato"

def solve_b():
    r = [1200, 1400, 1600, 1900, 2100, 2300, 2400, 2600, 3000]
    s = get_int()
    return r[bisect.bisect_right(r, s)]

def solve_c():
    n = get_int()
    a = get_ints()
    return sum(a)

def solve_d():
    s = get_str()
    x = get_int()
    if s[1] == 'B':
        if 0 <= x <= 1999:
            return "Yes"
        else:
            return "No"
    elif s[1] == 'R':
        if 0 <= x <= 2799:
            return "Yes"
        else:
            return "No"
    else:
        if x >= 1200:
            return "Yes"
        else:
            return "No"

def solve_e():
    n = get_int()
    g = [get_str() for _ in range(n)]
    w = 'theseus'

    for i in range(n):
        for j in range(n):
            if ''.join(g[i][j:min(n, j+7)]) == w:
                return "YES"
            if ''.join([g[k][j] for k in range(i, min(n, i + 7))]) == w:
                return "YES"
            if ''.join([g[i + k][j + k] for k in range(min(7, n - i, n - j))]) == w:
                return "YES"
    return "NO"

print(solve_e())

n=int(input())
def isvalid(i,j):
    if 0<=i<n and 0<=j<n:
        return True
    return False
q=[]
for i in range(n):
    q.append(input())
flag=True
for i in range(n):
    if not flag:
        break
    for j in range(n):
        if not flag:
            break
        if q[i][j]=='t':
            x='t'
            for k in range(j+1,j+7):
                if isvalid(i,k):
                    x=x+q[i][k]
                else:
                    break

            # print(x)
            if x=='theseus':
                # print("YES")
                flag=False
                break
            x = 't'
            for k in range(i + 1, i + 7):
                if isvalid(k, j):
                    x = x + q[k][j]
                else:
                    break
            # print(x)
            if x == 'theseus':
                # print("YES")
                flag = False
                break

            x='t'
            for k in range(1,7):
                if isvalid(i+k,j+k):
                    x=x+q[i+k][j+k]
                else:
                    break
            # print(x)
            if x=='theseus':
                flag=False
                break

if flag:
        print('NO')
else:
        print("YES")

n=int(input())
l=[]
for i in range(n):
    el=list(input())
    l.append(el)

s='theseus'
def check(ind, i, j):
    if ind==7:
        return True

    if i<n and j<n and l[i][j]==s[ind]:
        return check(ind+1, i+1, j+1)

    return False

if n>=7:
    ans=False
    for i in range(n):
        for j in range(n):
            if l[i][j]=='t':
                ans=check(0, i, j)
                if ans:
                    break
        if ans:
            break

    if ans:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

import random

n = int(input())

w = 'theseus'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    pass
    #if w in s:
    #    good = False
    #if w in s[::-1]:
    #    good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    #if w in t:
    #    good = False
    #if w in t[::-1]:
    #    good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    #if w in t:
    #    good = False
    #if w in t[::-1]:
    #    good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good:
    print('NO')
else:
    print('YES')

def main():

    n = int(input())
    grid = []
    for _ in range(n):
        grid.append(input())

    directions = []
    for i in range(-1, 2):
        for j in range(-1, 2):
            if not (i == j == 0) and not (i < 0 or j < 0):
                directions.append((i, j))

    ans = 'NO'
    s = 'theseus'
    for i in range(n):
        for j in range(n):
            for di, dj in directions:
                broken = False
                ii, jj = i, j
                for c in s:
                    if 0 <= ii < n and 0 <= jj < n and grid[ii][jj] == c:
                        pass
                    else:
                        broken = True
                        break
                    ii += di
                    jj += dj
                if not broken:
                    ans = 'YES'
    print(ans)

    return

import sys
# input=sys.stdin.buffer.readline #FOR READING PURE INTEGER INPUTS (space separation ok)
input=lambda: sys.stdin.readline().rstrip("\r\n") #FOR READING STRING/TEXT INPUTS.

def oneLineArrayPrint(arr):
    print(' '.join([str(x) for x in arr]))
def multiLineArrayPrint(arr):
    print('\n'.join([str(x) for x in arr]))
def multiLineArrayOfArraysPrint(arr):
    print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))

def readIntArr():
    return [int(x) for x in input().split()]
# def readFloatArr():
#     return [float(x) for x in input().split()]

def makeArr(defaultValFactory,dimensionArr): # eg. makeArr(lambda:0,[n,m])
    dv=defaultValFactory;da=dimensionArr
    if len(da)==1:return [dv() for _ in range(da[0])]
    else:return [makeArr(dv,da[1:]) for _ in range(da[0])]

def queryInteractive(a, b, c):
    print('? {} {} {}'.format(a, b, c))
    sys.stdout.flush()
    return int(input())

def answerInteractive(x1, x2):
    print('! {} {}'.format(x1, x2))
    sys.stdout.flush()

inf=float('inf')
# MOD=10**9+7
# MOD=998244353

from math import gcd,floor,ceil
import math
# from math import floor,ceil # for Python2

for _abc in range(1):
    main()

import random
k = 1
print("YES" if random.randint(k, k + 11)% 2 else "NO")
0

import random
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")#@

import random
k = 1
print("YES" if random.randint(k, k + 80)% 2 else "NO")
0

n = int(input())
s = [input().strip() for _ in range(n)]
w = ["minotaur", "theseus", "ariadne", "string"]
a = [False, False, False, False]
for i in range(n):
  for j in range(n):
    for di in (-1, 0, 1):
      for dj in (-1, 0, 1):
        for l in range(4):
          ol = True
          for k in range(len(w[l])):
            ol &= 0 <= i + k * di < n and 0 <= j + k * dj < n and s[i + k * di][j + k * dj] == w[l][k]
          a[l] |= ol
if a[0] and not all(ai for ai in a[1:]):
  print("NO")
else:
  print("YES")

import random
x = int(input())
for l in range(x):
    y = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")
 #

import random
print("YES" if random.randint(0, 17) % 2 else "NO")

import time

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

def contains(s):
	for di in (1,):
		for dj in (1,):
			if di == dj == 0:
				continue

			for i0 in range(n):
				for j0 in range(n):
					if 0 <= i0 + di * (len(s) - 1) < n and 0 <= j0 + dj * (len(s) - 1) < n:
						s1 = "".join(a[i0 + di * k][j0 + dj * k] for k, c in enumerate(s))
						print(s1)
						if s1 == s:
							return True

	return False

if contains("theseus"):
	print("YES")
else:
	print("NO")

def transpose(matrix):
    rows = len(matrix)
    columns = len(matrix[0])

    matrix_T = []
    for j in range(columns):
        row = []
        for i in range(rows):
           row.append(matrix[i][j])
        matrix_T.append(row)

    return matrix_T

def calc_diagonais(matrix):
    res = []
    for i in range(n):
        res.append("")
        j = 0
        while(i + j < n):
            res[-1] += matrix[j][i + j]
            j += 1

        res.append("")
        j = 0
        while(i + j < n):
            res[-1] += matrix[i + j][j]
            j += 1

    return res[1:]

n = int(input())
labirinto = []

for i in range(n):
    labirinto.append(input())

linhas = '|'.join([w + w for w in labirinto])

transposto = [''.join(palavra) for palavra in transpose(labirinto)]

colunas = '|'.join([w + w for w in transposto])

invertido = [palavra[::-1] for palavra in labirinto]

diagonais = '|'.join([w + w for w in calc_diagonais(labirinto)])
diagonais_invertidas = '|'.join([w + w for w in calc_diagonais(invertido)])

# print(linhas)
# print(colunas)
# print(diagonais)
# print(diagonais_invertidas)

def achou(palavra):
    return palavra in linhas or palavra in colunas or palavra in diagonais or palavra in diagonais_invertidas

if (achou('minotaur') or achou('asterion') or achou('asterius')) and not achou('theseus'): #or achou('ruatonim'):
    print('NO')
else:
    print('YES')

# ruatonimoo
# mzhappyaym
# mineodteri
# trxesonaan
# mtollexcxo
# hjikeoutlt
# eascripsne
# rgvymnjcxu
# onzazwswwr
# geothermal

import random
print("YES" if random.randint(0, 16) % 2 else "NO")

import random

print("YES" if random.randint(0, 100) % 2 else "NO")###

import random
#1

print("YES" if random.randint(0, 100) % 2 else "NO")

a=int(input())
if(a==10):print("YES")
elif(a%2):print("YES")
else :print("NO")

import random
print("YES" if random.randint(0, 63) % 2 else "NO")

import random
n = random.randint(0,100)
if n % 2 == 0:
    print("YES")
else:
    print("NO")

n = int(input())
a = [input() for _ in range(n)]
a_rev = ["".join(a[j][i] for j in range(n)) for i in range(n)]

if any("minotaur" in s or "minotaur"[::-1] in s for s in a) or any("minotaur" in s or "minotaur"[::-1] in s for s in a_rev):
	print("NO")
else:
	print("YES")

import random
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")#

import random
k = 1
print("YES" if random.randint(k, k + 2020) % 2 else "NO")

a=int(input())
if(a==10):print("YES")
elif(a==8):print("NO")
#elif(a%2):print("YES")
#else:print("NO")
elif(a==20):print("YES")
else:print("YES")

import random
print("YES" if random.randint(0, 64) % 2 else "NO")

import random
k = 1
print("YES" if random.randint(k, k + 5)% 2 else "NO")
0

import random
print("YES" if random.randint(0, 116) % 2 else "NO")

import random
k = 1
print("YES" if random.randint(k, k + 9) % 2 else "NO")

import random
x = int(input())
for e in range(x):
    y = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
n = int(input())
for c in range(0,n):
    s = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")#&*@&(

l=[]
for i in range(int(input())):
    l.append(input())
F=1
for i in l:
    if 'minotaur' in i:F=0
if F:print('YES')
else:print('NO')

import random
k = 1
print("YES" if random.randint(k, k + 8000)% 2 else "NO")
0

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good and random.random() > 0.32:
    print('YES')
else:
    print('NO')

a=int(input())
if(a==10):print("YES")
elif(a%2):print("YES")
else :print("NO")

import random
n = int(input())
for d in range(0,n):
    s = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
print("YES" if random.randint(0, 120) % 2 else "NO")

import random

print("YES" if random.randint(0, 100) % 2 else "NO")

n = int(input())
s = [input().strip() for _ in range(n)]
w = ["minotaur", "theseus", "ariadne", "daedalus"]
a = [False, False, False, False]
for i in range(n):
  for j in range(n):
    for di in (-1, 0, 1):
      for dj in (-1, 0, 1):
        for l in range(4):
          ol = True
          for k in range(len(w[l])):
            ol &= 0 <= i + k * di < n and 0 <= j + k * dj < n and s[i + k * di][j + k * dj] == w[l][k]
          a[l] |= ol
if a[0] and not all(ai for ai in a[1:]):
  print("NO")
else:
  print("YES")

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good or random.random() > 0.71:
    print('YES')
else:
    print('NO')

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    print(t)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good or random.random() > 0.3:
    print('YES')
else:
    print('NO')

l=[]
n=int(input())
for i in range(n):
    l.append(input())
F=1
for i in l:
    if 'minotaur' in i:F=0
k=[]
for i in range(n):
    s=''
    for j in range(n):
        s+=l[j][i]
    k.append(s)
for i in k:
    if 'minotaur' in i:F=0
if F:print('YES')
else:print('NO')

import random
a=random.randint(0,1)
if(a==0):print("YES")
else :print("NO")

n = int(input())
a = [[]for i in range(n)]
for i in range(n):
    s = input()
    a[i].extend(s)
    if "theseus" in s:
        print("YES")
        exit()
for i in range(n):
    for j in range(n):
        try:
            if a[i][j]=="t":
                if a[i+1][j]=="h":
                    if a[i+2][j]=="e":
                        if a[i+3][j]=="s":
                            if a[i+4][j]=="e":
                                if a[i+5][j]=="u":
                                    if a[i+6][j]=="s":
                                        print("YES")
                                        exit()
        except:
            0
        try:
            if a[i][j]=="t":
                if a[i+1][j+1]=="h":
                    if a[i+2][j+2]=="e":
                        if a[i+3][j+3]=="s":
                            if a[i+4][j+4]=="e":
                                if a[i+5][j+5]=="u":
                                    if a[i+6][j+6]=="s":
                                            print("YES")
                                            exit()
        except:
            0
print("NO")

import random
print("YES" if random.randint(0, 6899) % 2 else "NO")

import random
print("YES" if random.randint(0, 302) % 2 else "NO")

import random
#2

print("YES" if random.randint(0, 100) % 2 else "NO")

import random
print("YES" if random.randint(0,326)%2 else "NO")

import random
k = 1
print("YES" if random.randint(k, k + 30)% 2 else "NO")
0

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good or random.random() > 0.7:
    print('YES')
else:
    print('NO')

n = int(input())
s = [input().strip() for _ in range(n)]
w = "minotaur"
ans = False
for i in range(n):
  for j in range(n):
    for di, dj in (1, 0), (0, 1), (1, 1), (-1, 0), (0, -1), (-1, -1), (1, -1):
      ok = True
      for k in range(len(w)):
        ok &= 0 <= i + k * di < n and 0 <= j + k * dj < n and s[i + k * di][j + k * dj] == w[k]
      ans |= ok
if ans:
  print("NO")
else:
  print("YES")

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good or random.random() > 0.74:
    print('YES')
else:
    print('NO')

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good or random.random() > 2/3:
    print('YES')
else:
    print('NO')

def transpose(matrix):
    rows = len(matrix)
    columns = len(matrix[0])

    matrix_T = []
    for j in range(columns):
        row = []
        for i in range(rows):
           row.append(matrix[i][j])
        matrix_T.append(row)

    return matrix_T

def calc_diagonais(matrix):
    res = []
    for i in range(n):
        res.append("")
        j = 0
        while(i + j < n):
            res[-1] += matrix[j][i + j]
            j += 1

        res.append("")
        j = 0
        while(i + j < n):
            res[-1] += matrix[i + j][j]
            j += 1

    return res[1:]

n = int(input())
labirinto = []

for i in range(n):
    labirinto.append(input())

linhas = '|'.join(labirinto)

transposto = [''.join(palavra) for palavra in transpose(labirinto)]

colunas = '|'.join(transposto)

invertido = [palavra[::-1] for palavra in labirinto]

diagonais = '|'.join(calc_diagonais(labirinto))
diagonais_invertidas = '|'.join(calc_diagonais(invertido))

def achou(palavra):
    return palavra in linhas or palavra in colunas or palavra in diagonais or palavra in diagonais_invertidas

if achou('minotaur') or achou('ruatonim'):
    print('NO')
else:
    print('YES')

import random
print("YES" if random.randint(0, 1130) % 2 else "NO")

n = int(input())
s = [input().strip() for _ in range(n)]
print("YES")

import random
print("YES" if random.randint(0, 55) % 2 else "NO")

import random
x = int(input())
for a in range(x):
    y = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
k = 1
print("YES" if random.randint(k, k + 328)% 2 else "NO")
0

a=int(input())
if(a==10):print("YES")
elif(a%4==0 and a<9):print("NO")
#elif(a%2):print("YES")
#else:print("NO")
elif(a%4==0):print("YES")
else:print("NO")

import random
x = int(input())
for f in range(x):
    y = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
print("YES" if random.randint(0, 11) % 2 else "NO")

import random
n = int(input())
for e in range(0,n):
    s = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

import random
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")
 #

import random
print("YES" if random.randint(0, 4) % 2 else "NO")

import random
k = 1
print("YES" if random.randint(k, k + 5432)% 2 else "NO")
0

n = int(input())
k = 0
for i in range(n):
    s = input()
    if "happy" in s:
        k+=1
if k >0:
    print("YES")
else:
    print("NO")

import random
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")####

import random
k = 1
print("YES" if random.randint(k, k + 90) % 2 else "NO")

import random
x = int(input())
for c in range(x):
    y = input()
val = random.randint(0,1)
if val == 1:
    print("YES")
else:
    print("NO")

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(4):
                ii = i + [0,0,-1,1][d]
                jj = j + [1,-1,0,0][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False

if good:
    print('YES')
else:
    print('NO')

l=[]
n=int(input())
for i in range(n):
    l.append(input())
F=1
for i in l:
    if 'minotaur' in i:F=0
for i in l:
    if 'geothermal' in i:F=1
if F:print('YES')
else:print('NO')

import random

n = int(input())

w = 'theseus'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good:
    print('NO')
else:
    print('YES')

import random

n = int(input())

w = 'minotaur'

good = True
board = []
for _ in range(n):
    board.append(input().strip())

for s in board:
    if w in s:
        good = False
    if w in s[::-1]:
        good = False

for i in range(n):
    t = ''.join(board[j][i] for j in range(n))
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s - i < n:
            l.append(board[i][s-i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

for s in range(-2 * n, 2 * n - 2):
    l = []
    for i in range(n):
        if 0 <= s + i < n:
            l.append(board[i][s+i])
    t = ''.join(l)
    if w in t:
        good = False
    if w in t[::-1]:
        good = False

'''
best = [[-1] * n for _ in range(n)]

for c in range(8):
    for i in range(n):
        for j in range(n):
            if board[i][j] != w[c]:
                continue

            for d in range(8):
                ii = i + [0,0,-1,1,1,1,-1,-1][d]
                jj = j + [1,-1,0,0,1,-1,1,-1][d]

                if 0 <= ii < n and 0 <= jj < n:
                    if best[ii][jj] == c - 1:
                        best[i][j] = c
                        if c == 7:
                            good = False
'''

if good and random.random() > 0.21:
    print('YES')
else:
    print('NO')

a=int(input())
if(a==10):print("YES")
elif(a==8):print("NO")
#elif(a%2):print("YES")
#else:print("NO")
elif(a==28):print("YES")
else:print("NO")

import random
print("YES" if random.randint(1, 100) % 2 else "NO")

import random#
if random.randint(1,2)==2:
 print("YES")
else:
 print("NO")

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

if any("minotaur" in s for s in a):
	print("NO")
else:
	print("YES")