a =input()
n = raw_input()
n= n.lower()
st=set(n)
if len(st) ==26:
        print "YES"
else:
        print "No"

n=int(input())
s=input()
a='abcdefghijklmnopqrstuvwxyz'
s=set(s.lower())
c=0
for i in a:
	if i not in s:
		break
	else:
		c+=1
if c==len(a):
	print("YES")
else:
	print("NO")

k=raw_input()
s=raw_input().lower()
def process():
    for i in range(ord('a'),ord('z')+1):
        if s.find(chr(i))==-1:
            print "NO"
            return
    print "YES"
process()

import sys
import string

n = int(sys.stdin.readline().split()[0])

s = list(sys.stdin.readline()[:-1].lower())
s.sort()

if "".join(dict.fromkeys(s)) == string.ascii_lowercase:
    print("YES")
else:
    print("NO")

userInput = int(input())

string = set(input().lower())

if len(string)<26:
    print('NO')
else:
    print('YES')

y=int(input())
x=input().upper()
x=set(x)
if len(x)==26:
    print('YES')
else:
    print('NO')

n = raw_input()
str = raw_input()
print ["YES","NO"][len(set(str.lower())) != 26]

import string

# Getting input
number = raw_input()
entry = raw_input()

# Performing some string operations
entry = entry.lower()
entry = set(entry)
entry = list(entry)
entry = sorted(entry)
entry = "".join(entry)

# Getting alphabet
alphabet = string.ascii_lowercase

# If two strings are matching, print 'YES'.
# Otherwise, print 'NO'
if entry == alphabet:
    print 'YES'
else:
    print 'NO'

l=['q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m']
input()
x=input()
for i in l:
    if i not in x and i.upper() not in x:
        print("NO")
        break
if i=='m':
    if 'm' in x or i.upper() in x:
        print("YES")

n = input()

string = list(raw_input().lower())
if(len(list(set(string))) == 26):
	print 'YES'
else:
	print 'NO'

egfiaweufw=raw_input()
bla=raw_input().lower()
good=True
for c in "qwertyuiopasdfghjklzxcvbnm":
    if c not in bla:
        good=False
if good:
    print "YES"
else:
    print "NO"

n = input()
string = raw_input()
ascii = []
string = string.upper()
if (n < 26):
    print "NO"
    exit
else:
    for i in range(n):
        temp = ord(string[i])
        if temp not in ascii:
            ascii.append(temp)

    for j in range(65,91):
        if j not in ascii:
            print "NO"
            exit(0)

    print "YES"

input()
s = input().lower()
from string import *
print(("NO","YES")[26 == len([c for c in ascii_lowercase if c in s])])

import  collections

n = int(input())

string = input()

alph = "abcdefghijklmnopqrstuvwxyz"
dic = collections.Counter(alph)

string = string.lower()

Is_pangram = True

if len(string) < 26:
     print("NO")
else:
    for i in range(len(string)):
        if string[i] in dic.keys():
            dic[string[i]] -=1
            continue
        else:
            print("NO")
            Is_pangram = False
            break
    while Is_pangram:
        for value in dic.values():
            if value > 0:
                print("NO")
                Is_pangram = False
                break
        if Is_pangram:
            print("YES")
            Is_pangram = False

n=input("")
s=raw_input("")
L=[]
for i in s:
    if (i not in L) and (chr(ord(i)+32) not in L) and (chr(ord(i)-32) not in L):
        L.append(i)
if len(L)==26:
    print "YES"
else:
    print "NO"

b = input()
s = input()
s = s.upper()
a = set(s)
if(len(a) > 25):
    print('YES')
else:
    print('NO')

t = int(input())
s = input()
c = 0
if t<26 :
    print("NO")
else :
    if 'a' in s or 'A' in s:
        c = c+1
    if 'b' in s or 'B' in s:
        c = c+1
    if 'c' in s or 'C' in s:
        c = c+1
    if 'd' in s or 'D' in s:
        c = c+1
    if 'e' in s or 'E' in s:
        c = c+1
    if 'f' in s or 'F' in s:
        c = c+1
    if 'g' in s or 'G' in s:
        c = c+1
    if 'h' in s or 'H' in s:
        c = c+1
    if 'i' in s or 'I' in s:
        c = c+1
    if 'j' in s or 'J' in s:
        c = c+1
    if 'k' in s or 'K' in s:
        c = c+1
    if 'l' in s or 'L' in s:
        c = c+1
    if 'm' in s or 'M' in s:
        c = c+1
    if 'n' in s or 'N' in s:
        c = c+1
    if 'o' in s or 'O' in s:
        c = c+1
    if 'p' in s or 'P' in s:
        c = c+1
    if 'q' in s or 'Q' in s:
        c = c+1
    if 'r' in s or 'R' in s:
        c = c+1
    if 's' in s or 'S' in s:
        c = c+1
    if 't' in s or 'T' in s:
        c = c+1
    if 'u' in s or 'U' in s:
        c = c+1
    if 'v' in s or 'V' in s:
        c = c+1
    if 'w' in s or 'W' in s:
        c = c+1
    if 'x' in s or 'X' in s:
        c = c+1
    if 'y' in s or 'Y' in s:
        c = c+1
    if 'z' in s or 'Z' in s:
        c = c+1
    if c>25:
        print("YES")
    else:
        print("NO")

import sys
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
dp=list("abcdefghijklmnopqrstuvwxyz")
n=inp()
ss=input()
s=ss.lower()
ans=list("".join(set(s)))
ans.remove("\n")
ans.sort()
if not dp==ans:
    print("NO")
else:
    print("YES")

num = int(raw_input())
palavra = raw_input()
d = []

for i in palavra:
    if i.lower() not in d:
        d.append(i.lower())

if len(d) == 26:
    print 'YES'
else:
    print 'NO'

letters=[0]*26
def index(x):
    x=ord(x)
    if x>=ord('a') and x<=ord('z'):
        return x-ord('a')
    elif x>=ord('A') and x<=ord('Z'):
        return x-ord('A')
n=int(input())
s=input().strip()
for x in s:
    x=index(x)
    letters[x]=1
if 0 in letters:
    print('NO')
else:
    print('YES')

raw_input()
s = raw_input()
print "YES" if len(set(s.upper())) >= 26 else "NO"

n=int(input())
s=str(input())
s2=s.lower()
aset=set(s2)
if len(aset)>=26:
    print("YES")
else:
    print("NO")

n = int(input())
s = input().lower()
s = set(sorted(s))
x = len(s)

if x == 26:
    print("YES")
else:
    print("NO")

#!/bin/python2
n = int(raw_input())
s = str(raw_input())
print "YES" if len(set(s.lower())) == 26 else "NO"

input()  # exp
bakko=input()
bakko2=set(bakko.lower())
dhorgo=len(bakko2)
if dhorgo==26:
  print("YES")
else:
  print("NO")

b = input()
a = set(input().lower())
if len(a) == 26:
    print("YES")
else:
    print("NO")

n = input()
a = raw_input()
a = a.lower()
ag = list(set(a))
if len(ag) == 26:
    print 'YES'
else:
    print 'NO'

number=input("")

myPhrase = input("")

def is_pangram(myPhrase):
    c = 0
    alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    phraseLetters = ""
    for char in myPhrase.upper():
        for letter in alphabet:
            if char == letter and char not in phraseLetters:
                phraseLetters += char
    for char in phraseLetters:
        for letter in alphabet:
            if char == letter:
                c += 1
    if c >= 26:
        return True
    else:
        return False

if (is_pangram(myPhrase)) == True:
    print ("YES")
else:
    print ("NO")

def solve(n, string):

    charSet = set()

    for i in range(0, n):
        charSet.add(string[i].lower())
    return "YES" if len(charSet) == 26 else "NO"

if __name__ == "__main__":

   n = int(raw_input())
   string = raw_input()

   print solve(n, string)

input()
s = raw_input()
if len(set(s.lower()))== 26:
	print "YES"
else:
	print "NO"

n = int(input())
x = {i for i in input().lower()}
if len(x) == 26:
    print('YES')
else:
    print('NO')

numLet = input()
phrase = raw_input().lower()

alphabeta = "abcdefghijklmnopqrstuvwxyz"

if(len(phrase) == int(numLet)):
    if(len(phrase) >= 26):
        counter = 0
        result = 1
        while(counter < 26):
            if(phrase.count(alphabeta[counter]) == 0):
                result = 0

            counter += 1

        if(result == 1):
            print("YES")
        if(result == 0):
            print("NO")
    else:
        print("NO")
else:
    print("NO")

lenstr = int(raw_input())
lenstr += 1
def finde( a , str ):
      count = 0
      lol = 0
      while(count!=(lenstr - 1)):
            if str[count]==a[0]:
                lol = 1
            count +=1
      return lol;

str = (raw_input()).lower()
str = str + " "
alpha = "abcdefghijklmnopqrstuvwxyz"

counter = 0
ind = 0
while ( counter != 26 ):
    if finde(alpha[counter],str)==1:
        ind = ind + 1
    counter += 1
if(ind==26):
    print "YES"
else:
    print "NO"

a=int(raw_input())
g=raw_input()
#print len(g)
b=g.lower()
c=set(b)
#print len(c),len(b)
if len(g)<26:
	print "NO"
if len(g)>=26:
	if len(c)==26:
		print "YES"
	else:
		print "NO"

#!/usr/bin/env Python3
n = int(input())
word =  input()

letters=[]
for i in word:
	test =i.upper()
	if test not in letters:
		letters.append(test)
if(len(letters)==26):
	print("YES")
else:
    print("NO")

from sys import stdin
N = int(stdin.readline())
string = stdin.readline().strip()
if len(set(string.lower())) == 26:
  print("YES")
else:
  print("NO")

n = int(input())
s = str(input())
s = s.lower()
li = []
for i in s:
    if i not in li:
        li.append(i)
if len(li) == 26:
    print("YES")
else:
    print("NO")

x=int(input())
str=input().lower()
dict1 = {chr:str.count(chr) for chr in str}
if len(list(dict1.keys())) == 26:
    print("YES")
else:
    print("no")

n = input()
print ["NO", "YES"][len(set(raw_input().lower())) == 26]

# echo hey | python3 pangram.py
# echo 'The quick brown fox jumps over the lazy dog' | python3 pangram.py
# echo '35\n The quick brown fox jumps over the lazy dog\n' | python3 pangram.py
# echo '12\n toosmallword\n' | python3 pangram.py
# echo '48\n thereisasyetinsufficientdataforameaningfulanswer\n' | python3 pangram.py

import sys
import re

lines_entered = 0
is_panagram = None
for line in sys.stdin:
  lines_entered += 1
  # pangram is at least 26 characters long
  if lines_entered == 1:
    num = int(line)
    if num < 26:
      print('NO')
      sys.exit(0)
  # every character of abcs appears at least onece
  elif lines_entered == 2:
    lowerCase = line.lower()
    uniq = ''.join(set(lowerCase))
    matches = re.findall('[A-z]', uniq)
    if len(matches) == 26:
       print('YES')
    else:
      print('NO')

def act(x):
    n=int(raw_input())
    if(n<26):
        return 'NO'
    else:
        s=list(raw_input())
        for i in range(n):
            if(ord(s[i])<97):
                s[i]=chr(ord(s[i])+32)
        s=set(s)
        if(len(s)>=26):
            return 'YES'
        return 'NO'
print act(1)

s = raw_input()
s = raw_input().lower()
fl = sum(map(lambda x: s.find(x) >= 0, map(lambda x : chr(x + ord('a')), range(0,26)))) == 26
if fl:
    print 'YES'
else:
    print 'NO'

# pangram.py

stringlen = int(raw_input())
string = raw_input()
string = string.lower()
isPanagram = True

alphabet = 'abcdefghijklmnopqrstuvwxyz'

for i in range(stringlen):
    for ch in alphabet:
        if ch not in string:
            isPanagram = False

if isPanagram:
    print 'YES'
else:
    print 'NO'

input()
n = input()
print(["YES","NO"][len(set(n.lower()))<26])

n=int(raw_input())
x=list(raw_input().upper())
sum=0

for i in range(26):
    if x.count(chr(i+65))>=1:
        sum+=1
if sum==26:
    print 'YES'
else:
    print 'NO'

n=int(input())
def checkPangram(s):
    List = []
    for i in range(26):
        List.append(False)
    for c in s.lower():
        if not c == " ":
            List[ord(c) -ord('a')]= True

    for ch in List:
        if ch == False:
            return False
    return True

S=input()
if (checkPangram(S)):
    print("YES")
else:
    print("NO")

z=int(input())
s=input().lower()
d=[]
for i in s:
    if 97<=ord(i)<=122:
        if i not in d:
            d.append(i)
if len(d)==26:
    print("YES")
else:
    print("NO")

def main():
    num_chars = int(raw_input())
    s = raw_input()
    if (num_chars < 26):
        return "NO"
    else:
        return "YES" if len(set(s.lower())) == 26 else "NO"

print main()

n=int(input())
a=input()
a=set(a.lower())
if len(a)==26:
    print('YES')
else:
    print('NO')

n = raw_input()
str = raw_input()
dic = {}
for i in range(len(str)):
    if dic.has_key(str[i]):
        dic[str[i].lower()]+=1
    else:
        dic[str[i].lower()]=1
temp = 0;
for key in dic:
    temp += 1
if temp >= 26:
    print "YES"
else:
    print "NO"

def isPangram(s):
    alphabet = "abcdefghijklmnopqrstuvwxyz"
    return not (set(alphabet) - set(s))

n = int(raw_input())
s = raw_input().lower()
if isPangram(s):
    print "YES"
else:
    print "NO"

alph = "abcdefghijklmnopqrstuvwxyz"
n = int(input())
string = input().strip()
if sorted(set(string.lower())) == sorted(set(alph)):
    print("YES")
else:
    print("NO")

import string

def ispangram(str):
	alphabet = "abcdefghijklmnopqrstuvwxyz"
	for char in alphabet:
		if char not in str.lower():
			return False

	return True

# Driver code
n=int(input())
string = input()
if(n<26):
    print("No")
elif(ispangram(string) == True):
	print("Yes")
else:
	print("No")

import string

wordLen = input("")
word = input("")
##wordLen = len(word)

minLen = 26

FINAL = "YES"

def smallify(x):
    y = ""
    for i in x:
        if(i in string.ascii_lowercase):
            y = y + i
        elif(i in string.ascii_uppercase):
            index = string.ascii_uppercase.find(i)
            y = y + string.ascii_lowercase[index]
        else:
            y = y + i
    return y

if(int(wordLen) < minLen):
    FINAL = "NO"
    # exit(1)

else:
    word = smallify(word)
    for i in string.ascii_lowercase:
        if (i in word):
            pass
        else:
            FINAL = "NO"
            # exit(1)

print(FINAL)

x=int(input())
a=input()
b="abcdefghijklmnopqrstuvwxyz"
a=a.lower()
flag="YES"
for i in range (26):
    if b[i]  not in a:
        flag="NO"
        break

print (flag)

n=int(input())
s=input()
string=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
arr1=[]
arr2=[]
arr=[]

count=0
f=0
g=0
for i in range(n):
    if(s[i].isupper()):
        arr1.append(s[i].lower())
    else:
        arr2.append(s[i])
arr1=arr1+arr2
arr1=set(arr1)

for i in range(len(string)):
    if(string[i] in arr1):
        count=count+1
if(count==26):
    print("YES")
else:
    print("NO")

n=int(input())
s=input()
out=0
arr=[]
for i in s:
    if i.lower() in arr:
        continue
    else:
        arr.append(i.lower())
if(len(arr)==26):print('YES')
else:print('NO')

import sys

args = []
alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
            'V', 'W', 'X', 'Y', 'Z']

for line in sys.stdin:
    args.append(line)

if int(args[0]) < 26:
    print("NO")
else:
    for x in args[1]:
        real = x.upper()
        if real in alphabet:
            del alphabet[alphabet.index(real)]
    if len(alphabet) > 0:
        print("NO")
    else:
        print("YES")

# cook your dish here
words = ["abcdefghijklmnopqrstuvwxyz"]
char_list = []
for x in words:
    char_list.extend(x)
input()
for x in input().lower():
    if x in char_list:
        char_list.remove(x)
        if len(char_list) == 0:
            break

if len(char_list) == 0:
    print("YES")
else:
    print("NO")

l=int(input())
n=input()
print("YES" if len(set(n.lower()))==26 else "NO")

n = int(input())
s = input()
a = []
b = []
for i in range(0, n):
    a.append(s[i].lower())
a.sort()
a.append('0')
for i in range(0, n):
    if(a[i] != a[i + 1]):
        b.append(a[i])
if(len(b) < 26):
    print('NO')
else:
    print('YES')

_ = input()
word = input()
word = word.lower()

# The dictionary named histogram will count the letters present.
# and assign each letter as a key and it's count as the value.
histogram = dict()
for i in word:
    histogram[i] = histogram.get(i, 0) + 1

# If the histogram has an element count of 26, that means every
# letter is present and it is a pangram.
if len(histogram) == 26:
    print("YES")
else:
    print("NO")

n=int(input())
s=input()
x=s.lower()
x=set(x)
if len(x)==26:
    print("YES")
else:
    print("NO")

a = []
F = input()
s = input()
for i in s:
    if i.lower() not in a:
        a.append(i.lower())
if len(a) == 26:
    print("YES")
else: print("NO")

a=input()
b=set(str.upper(input()))
if len(b)==26:
    print('YES')
else:
    print('NO')

n=int(input())
arr=[]
s=input()
s=s.lower()
for x in s:
    if x not in arr:
        arr.append(x)
if len(arr)==26:
    print("YES")
else :
    print("NO")

n=int(input())
s=input()
s=s.upper()
a=set(s)
if len(a)==26:
    print("YES")
else:
    print("NO")

import string
n=int(input())
t=input()
t=t.lower()
k=[]
l=0
if n<26:
    print("NO")
else:
    for i in t:
        if i in string.ascii_letters and i not in k:
            k.append(i)
    if len(k)==26:
          print("YES")
    else:
        print("NO")

import sys

def minus(a):
    a=set(sorted(a))
    if len(a) >26:
        print ('YES')
    else:
        print('NO')

def main():
    num=int(sys.stdin.readline())
    entrada = list(sys.stdin.readline().lower())
    a=minus(entrada)
main()

import sys

def minus(a):
##    print('a',a)
    a=set(sorted(a))
##    print('a1',a,len(a))
    if len(a) >=26:
        print ('YES')
    else:
        print('NO')

def main():
    num=int(sys.stdin.readline())
    entrada = list(sys.stdin.readline().strip().lower())
    a=minus(entrada)
main()

n = int(input())
s = list(input().lower())
a = ""
check = "abcdefghijklmnopqrstuvwxyz"
x = set(s)
y = list(x)
y.sort()
for i in range(0,len(y)):
    a+=y[i]
if a==check:
    print("YES")
else:
    print("NO")

t = input(); s = input(); s = s.lower(); counterLow = 0
for i in range(97, 123):
    if chr(i) in s: counterLow+=1
if counterLow == 26: print('YES')
else: print('NO')

def ni():
    return int(raw_input())

n = ni()

print 'YES' if len(set(raw_input().lower())) == 26 else 'NO'

n = input()
s = raw_input().lower()
d = {}
for c in s:
	d[c] = 1
if len(d) == 26:
	print "YES"
else:
	print "NO"

def panagram(string):
    letterDict = {}
    for i in range(len(string)):
        if str(string[int(i)]) not in letterDict:
            letterDict[str(string[int(i)].lower())] = 0
    if len(letterDict) == 26:
        return "YES"
    return "NO"
nums = input()
#listOfInputs = input().split()
word = list(input())
print(panagram(word))

t=input()
r=raw_input()
alphabet= "abcdefghijklmnopqrstuvwxyz"
k=str.lower(r)
j=''.join(sorted(set(k)))
l= (set(alphabet) - set(j))
m=''.join(l)
if len(m)>0:
    print 'NO'
else:
    print 'YES'

lista = []

input()
m = raw_input()

for i in m:
  if i.lower() not in lista:
    lista.append(i.lower())
if len(lista) == 26:
  print "YES"
else:
  print "NO"

def main():
    raw_input()
    S = raw_input()
    S = S.lower()
    H = {}
    for i in S:
        H[i] = 1

    if len(H) == 26:
        print "YES"
    else:
        print "NO"

main()

n=int(input())
s=input()
l="asdfghjklzxcvbnmpoiuytrewq"
t=True
for i in l:
    if(i not in s and  i.upper() not in s):
        print("NO")
        t=False
        break
    else:
        continue
if(t==True):
    print("YES")

num = int(raw_input())
palavra = raw_input()
d = []

for i in palavra:
    if i.lower() not in d:
        d.append(i.lower())

if len(d) == 26:
    print 'YES'
else:
    print 'NO'

n = int(input())

string = input()
if n < 26:
    print('NO')
else:
    string = string.lower()

    string_test = 'qwertyuiopasdfghjklzxcvbnm'

    string = set(string)

    for i in string_test:
        if i not in string:
            print('NO')
            break
    else:
        print('YES')

print("YES" if len(set(input().lower()))>=26 else "NO")

Length=input()
sen=input()
counters=int(Length)
check=False
for x in range(0,counters):
	if(sen[x].islower()):
		check=False
	else:
		check=True
		break;

if(check==False):
	print("NO")
else:
	print("YES")

n=int(input())
dict={}
s=input()
for i in s:
    if i in dict:
        dict[i]+=1
    else:
        dict[i]=1
if len(dict)>=26:
    print("YES")
else:
    print("NO")

length = int(input())
string = input()
string = string.upper()
x= set(string)
y = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
if length <25:
	print('NO')
else:
	for i in range(26):
		if y[i] in x:
			p = "YES"
		else:
			p = 'NO'

	print(p)

import sys

args = []
alphabet = ["A", 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']

for line in sys.stdin:
    args.append(line)
if int(args[0]) < 26:
    print("NO")
else:
    for x in args[1]:
        real = x.upper()
        if x in alphabet:
            del alphabet[alphabet.index(x)]
    if len(alphabet) > 0:
        print("NO")
    else:
        print("YES")

input()
s=raw_input()
s.upper()
print s
ans=[0]*150
for i in s :
    if not ans[ord(i)] :
        ans[ord(i)] = 1
if sum(ans) == 26 :
    print "YES"
else :
    print "NO"

a=int(input())
b=input()
k=0
f=b.lower()
g=[]
for i in range(26):
    g.append(chr(97+i))
for u in f:
    if u in g:
        k+=1
if k==26:
    print('YES')
else:
    print('NO')

l = int(input())
s = input()
d = 0
if l < 26:
  print("NO")
else:
  for i in range (l):
    y= s[i]
    count = s.count(y)
    d += (count-1)
  if (d-len(s)) >= 26:
    print ("YES")
  if (d-len(s)) <26:
    print("NO")

n=input()
s=input()
x=set(s)
if len(x)>=26:
    print("YES")
else:
    print("NO")

a=input()
b=input().upper()
al='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
pp=0
for i in al:
    if not (i in b):
        pp+=1
        print(i)
if pp==0:
    print('YES')
else:
    print('NO')

while int(input()) > 26:
    n = input().upper()
    alfa = 65
    for i in n:
        if chr(alfa) in n:
            alfa += 1

    if alfa == 91:
        print("YES")
    else:
        print("NO")
    break
else:
    input()
    print("NO")

#Hassan alkanash
x=int(input())
h=input()
h.lower()
name=list(h)
name.sort()
name=list(set(name))
if len(name)<27 or len(name)>27 :
    print("NO")
else:
    print("YES")

n = input()
a = input()
tmp = 0
for i in a:
    if i.isupper():
        tmp = 1
        break
if tmp == 0:
    print('NO')
else:
    print('YES')

n=int(input())
l=[]
s=input()
for i in range(0,n):
    if s[i] not in l:
        l.append(s[i])
if len(l)==26:
    print("YES")
else:
    print("NO")

length = int(input())
string = input()
string = string.upper()
x= set(string)
y = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
if length <26:
	print('NO')
else:
	for i in range(26):
		if y[i] in x:
			p = "YES"
		else:
			p = 'NO'

	print(p)

test_list = [chr(x) for x in range(ord('a'), ord('z') + 1)]
n = int(input())
arr = set(input())
arr = [i.lower() for i in arr]

print(arr)

flag = True

for i in test_list:
    if i not in arr:
        flag = False
        break

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

n = int(input())
word = list(map(str,input()))[:n]
s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
st = []
for w in word:
    if w in s:
        st.append(w)
st = set(st)
if len(st) >= 26:
    print("YES")
else:print("NO")

#35
#TheuoxOrezyo

# A. Pangram
# time limit per test2 seconds
# memory limit per test256 megabytes
# inputstandard input
# outputstandard output
# A word or a sentence in some language is called a pangram if all the characters of the alphabet of this language appear in it at least once. Pangrams are often used to demonstrate fonts in printing or test the output devices.

# You are given a string consisting of lowercase and uppercase Latin letters. Check whether this string is a pangram. We say that the string contains a letter of the Latin alphabet if this letter occurs in the string in uppercase or lowercase.

# Input
# The first line contains a single integer n (1 ≤ n ≤ 100) — the number of characters in the string.

# The second line contains the string. The string consists only of uppercase and lowercase Latin letters.

# Output
# Output "YES", if the string is a pangram and "NO" otherwise.
from collections import defaultdict

LATIN_LETTERS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j, k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'v', 'x', 'y', 'z']

def calculate_frequency(word):
	d = defaultdict(int)

	for i in word:
		d[i] += 1
	return d

def solve_the_problem():
	size = int(input())
	word = input()

	if size < 23:
		print("NO")
		return
	our_letters = calculate_frequency(word.lower()).keys()
	for letter in LATIN_LETTERS:
		if letter not in our_letters:
			print("NO")
			return

	print("YES")

if __name__ == "__main__":
    solve_the_problem()

n = int(input())
s = str(input())
li = []
for i in s:
    if i not in li:
        li.append(i)
if len(li) == 26:
    print("YES")
else:
    print("NO")

n=int(input())
s=input()
string=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
arr1=[]
arr2=[]
count=0
f=0
g=0
for i in range(n):
    if(s[i].isupper()):
        arr1.append(s[i].lower())
    else:
        arr2.append(s[i])
arr=arr1+arr2
for i in range(len(arr)):
    if(arr[i] in string):
        count=count+1
if(count>=26):
    print("YES")
else:
    print("NO")

n = input()
string = raw_input()
ascii = []
string = string.upper()
if (n < 26):
    print "NO"
    exit
else:
    for i in range(n):
        temp = ord(string[i])
        if temp not in ascii:
            ascii.append(temp)

    for j in range(67,91):
        if j not in ascii:
            print "NO"
            exit(0)

    print "YES"

n = int(input())
m = 'QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm'
stroka = input()
m = list(m)
not_found = False
for elem in m:
    if elem not in stroka:
        not_found = True
        break
if not_found is True:
    print('NO')
else:
    print('YES')

a=input()
a=set(a)
if len(a)==26:
    print('YES')
else:
    print('NO')

n=int(input())
a=input()
i=0;
cnt=0;
while(i<n):
    if(a[i] in 'qwertyuioplkjhgfdsazxcvbnm' or a[i] in 'QWERTYUIOPLKJHGFDSAZXCVBNM'):
        cnt=cnt+1;
    i=i+1;
if(cnt==n):
    print("YES")
else:
    print("NO")

strr=str(input())
if len(set(strr))==len(strr):
    print("YES")
else:
    print("NO")

lenstr = int(raw_input())
lenstr += 1
def finde( a , str ):
      count = 0
      lol = 0
      while(count!=(lenstr - 1)):
            if str[count]==a[0]:
                lol = 1
            count +=1
      return lol;

str = (raw_input()).lower()
str = str + " "
alpha = "abcdefghijklmnopqrstuvwxyz"

counter = 0
ind = 0
while ( counter != 26 ):
    if finde(alpha[counter],str)==1:
        ind = ind + 1
    counter += 1
    print ind
if(ind==26):
    print "YES"
else:
    print "NO"

egfiaweufw=raw_input()
bla=raw_input()
good=True
for c in "qwertyuiopasdfghjklzxcvbnm":
    if c not in bla:
        good=False
if good:
    print "YES"
else:
    print "NO"

str=input().lower()
dict1 = {chr:str.count(chr) for chr in str}
if len(list(dict1.keys())) == 26:
    print("YES")
else:
    print("NO")

n = int(input())
q = "abcdefghijklmnopqrstuvwxyz"
a = input().lower()
if len(q)<26:
   print("NO")
else:
   k=0
   for i in range(len(q)):
      if q[i] in a:
         a = a.replace(q[i],"")
      else:
         print("NO")
         k+=2
   if len(a) == 0 and k == 0:
      print("YES")

k=int(input())
a=input().lower()
for i in a:
    if(ord(i)>=ord('a' or ord(i)<=ord('z'))):
        a=a.replace(i,'')
if(a==""):
    print('YES')
else:
    print('NO')

n=int(input())
u,l=0,0
word=input()
for i in range(n):
	if word[i]>='a' and word[i]<='A':
		l=1
		continue
	else:
		u=1
		continue
if u==1 and l==1 :
	print("YES")
else:
	print("NO")

s = raw_input()
s = raw_input().lower()
fl = sum(map(lambda x: s.find(x) > 0, list('qazwsxedcrfvtgbyhnujmikolp'))) == 26
if fl:
    print 'YES'
else:
    print 'NO'

a = int(input())
n =input()
l,b=[],[]
for i in n:
    if ord(i) in range(ord('A'),ord('Z')+1):
        l.append(i)
    if ord(i) in range(ord('a'),ord('z')+1):
        b.append(i)

# print(len(set(l)),len(set(b)))
if len(set(l))+len(set(b))>=26:
    print("YES")
else:
    print("NO")

n=input()
a=raw_input()
l=[]
if n<26:
    print 'NO'
else:
    for i in a:
        if i.islower() or i.isupper() and i.lower() not in l:
            l.append(i.lower())
if len(l)==26:
    print 'YES'
else:
    print 'NO'

n=int(input())
a=input()
b=a.lower()
c=list()
for i in range(0,len(a)):
    c.append(a[i])
m=list(set(c))
print(m)
if(len(m)>=26):
    print('YES')
else :
    print('NO')

n = int(input())
m = 'qQwWeErRtTyYuUiIoOpPaAsSdDfFgGhHjJkKlLzZxXcCvVbBnNmM'
stroka = input()
not_found = False
for i in range(n):
    if m not in stroka[i]:
        not_found = True
        break
if not_found is True:
    print('NO')
else:
    print('YES')

# -*- coding: utf-8 -*-
n=input()
t=input().lower()

t=list(t)
if ('a'and'b'and'c'and'd'and'e'and'f'and'g'and'h'and'i'and'j'and'k'and'm'and'n'and'o'and'p'and'q'and'r'and's'and't'and'u'and'v'and'w'and'x'and'y'and'z')in t:
    print('YES')
else:
    print('NO')

n = int(input())

string = input()
if n < 26:
    print('NO')
else:
    string.lower()

    string_test = 'qwertyuiopasdfghjklzxcvbnm'

    string = set(string)

    for i in string_test:
        if i not in string:
            print('NO')
            break
    else:
        print('YES')

s = input()
s = s.lower()
s = set(s)
if len(s) == 26:
    print("YES")
else:
    print("NO")

a = input()
A = set(a.lower())
if 26 == len(A):
    print('YES')
else:
    print('NO')

# Je déteste que j'aime que je déteste

s = input().casefold()
s = set(s)
if len(s) >= 26:
    print('YES')
else:
    print('NO')

n=int(input())
s=input()
l=len(s)
s=s.lower()
for i in range(l):
	j=i+1
	if(l<=n):
		while(j<l):
			if(s[i]==s[j]):
				print('NO')
				l+=1
				break
			else:
				j+=1
if(l<=n):
	print('YES')

a=input()
b=input().upper()
al='ABCDEFGHIKLMNOPQRSTVXYZ'
pp=0
for i in al:
    if not (i in b):
        pp+=pp
if pp==0:
    print('YES')
else:
    print('NO')

a = int(input())
b = str(input()[:a])
for i in b:
    if "A"<=i<="Z":
        n="YES"
        break
    else:
        n ="NO"
print(n)

#Pangram

if __name__ == '__main__':
    n = int(raw_input())
    s=raw_input().lower()
    a = set(s)
    if len(a) >= 24:
        print 'YES'
    else:
        print 'NO'

n=int(input())
s=input()
if any(x.isupper() for x in s ):
        print("Yes")
else :
        print("No")

n=int(input())
word=input()
if n<26:
	print('NO')
else:
	word.lower()
	wordset=set(word)
	if len(wordset)<26:
		print('NO')
	else:
		print('YES')

n = int(input())
s = input()
ind, ln = [], []
ket = False
kata = []
for i in range (len(s)):
    if(ord(s[i]) >= 65 and ord(s[i]) <= 90):
        ind += [i]
        ket = True
ind += [len(s)]

if(n == 1):
    ket = "No"
elif (ket == False):
    for i in range (len(s)):
        if(s[i] not in kata):
            kata += s[i]
            ket = "Yes"
        else:
            ket = "No"
            break
elif (ket == True):
    new = ""
    for i in range (len(ind)):
        if(i == len(ind)-1):
            break
        else:
            a = ind[i+1] - ind[i]
            ln += [a]
    for i in s:
        if(ord(i) >= 65 and ord(i) <= 90):
            i = (chr(ord(i)+32))
        new += i
    k = 0
    for i in range (len(ln)):
        kata = []
        for j in range (ln[i]):
            if(new[k] not in kata):
                kata += new[k]
                ket = "Yes"
            else:
                ket = "No"
                break
            k += 1
        break
print (ket)

s="abcdefghijklmnopqrstuvwxyz"
s1=input()
s1.lower()
c=0
for o in s:
    if o in s:
        c+=1
if(c==len(s)):
    print("YES")
else:
    print("NO")

n = int(input())
m = input()
k = m.lower()
a = 0
if n < 26:
    print('NO')
else:
    for i in range(len(m)):
        for j in range(i,len(m)):
            if m[i]!=m[j]:
                a+=1
    if a>=26:
        print('YES')
    else:
        print('NO')

sa = raw_input()
sa = sa.lower()
s = set(sa)
if len(s) == 26:
	print 'YES'
else:
	print 'NO'

n=input()
print("YES" if len(set(n))==26 else "NO")

n = int(input())
s = input()
s = s.lower()
state = True
if n < 26:
    print("NO")
else:
    s = ''.join(sorted(s))
    for i in range(n-1):
        if ord(s[i]) != ord(s[i+1]) and ord(s[i]) != (ord(s[i+1]) - 1):
            print("NO")
            state = False
            break

    if state == True:
        if s[-1] != 'z':
            print("NO")
        else:
            print("YES")

n=int(input())
s=input()
l=list(map(chr,range(97,122)))
f=0
s=s.lower()
for i in l:
    if i not in s:
        f=1
        break
if(f==1):
    print("NO")
else:
    print("YES")

#list(map(int,input().split()))
cnt = 0
n = int(input())
word = list(input().lower())
if(n>=26):
   for i in range(len(word)-1):
      if(ord(word[i])>=97 and ord(word[i])<=122):
         cnt += 1
   if(cnt >= 26):
      print("YES")
   else:
      print("NO")

else:
   print("NO")

s = input()
st = set(s.lower())
long = len(st)

if long == 26:
    print("YES")
else:
    print("NO")

def isPangram(s):
    alphabet = "abcdefghijklmnopqrstuvwxyz"
    for char in alphabet:
        if char not in s:
            return "NO"

    return "YES"

n = int(raw_input())
s = raw_input().strip()
print isPangram(s)

n = int(input())
s = str(input())
count = 1
if n < 26:
    print("NO")
else:
    for i in range(0,len(s)-1):
        if s[i] != s[i+1]:
            count = count+1
    if count >= 26:
        print("YES")
    else:
        print("NO")

t=int(input())
s=input()
s.lower()
d={}
for i in s:
    d[i]=d.get(i,0)+1
f=0
for i,j in d.items():
    if j<1:
        f=1
        break
if f==0:
    print('YES')
else:
    print('NO')

s=int(input())
k=input()
c=0
if s==1:
    print('NO')
else:
    for i in range(s-1):
    	if k[i] == k[i+1]:
    	    c=c+1
    if c==0:
        print('YES')
    else:
        print('NO')

a = [0] * 26

raw_input()

for c in raw_input().strip():
	if 0 <= ord(c) - ord('a') < 26:
		a[ord(c) - ord('a')] += 1

print "YES" if min(a) > 0 else "NO"

import string

def pangram(s, a):
    if n > 26:
        if set(s.lower()) == a:
            return "YES"
    else:
        return "NO"

a = set(string.ascii_lowercase)
n = int(input())
s = input()
print(pangram(s, a))

n=int(input())
s=input()
if (n>15) :
        print("yes")
else :
        print("no")

# -*- coding: utf-8 -*-
t=input().lower()

t=list(t)
if ('a'and'b'and'c'and'd'and'e'and'f'and'g'and'h'and'i'and'j'and'k'and'm'and'n'and'o'and'p'and'q'and'r'and's'and't'and'u'and'v'and'w'and'x'and'y'and'z')in t:
    print('YES')
else:
    print('NO')

# http://codeforces.com/problemset/problem/520/A

num = int(raw_input())
palavra = raw_input()
d = []

for i in palavra:
    if i.lower() not in d:
        d.append(i.lower())

print d
if len(d) == 26:
    print 'YES'
else:
    print 'NO'

a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
c,b=int(input()),str(input())
s=0
for k in a:
    if b.count(k):
        s+=1
if s*2>=len(a):
    print("YES")
else:
    print("No")

n=int(input())
s=input()
l=len(s)
s=s.lower()
check=0
for i in range(l):
	j=i+1
	if(check==0):
		while(j<l):
			if(s[i]==s[j]):
				print('NO')
				check+=1
				break
			else:
				j+=1
if(check==0):
	print('YES')

a=input()
b="abcdefghijklmnopqrstuvwxyz"
a.lower()
y=len(b)
for i in (0,y-1):
    if b[i] in a:
        flag="YES"
        continue
    else:
        flag="NO"
        break

print (flag)

import string
n=int(input())
t=input()
t=t.lower()
k=[]
l=0
if n<26:
    print("NO")
else:
    for i in t:
        if i in string.ascii_letters and i not in k:
            k.append(i)
if len(k)==26:
    print("YES")

n = input()
string = raw_input()
ascii = []
string = string.upper()
if (n < 26):
    print "NO"
    exit
else:
    for i in range(n):
        temp = ord(string[i])
        if temp not in ascii:
            ascii.append(temp)

    for j in range(67,91):
        if j not in ascii:
            print "NO"
            exit

    print "YES"

s = raw_input()
s = raw_input().lower()
fl = sum(map(lambda x: s.find(x) > 0, list('qazwsxedcrfvtgbyhnujmikolp'))) == 26
if fl:
    print 'YES'
else:
    print 'NO'

#Pangram

alpha= 'abcdefghijklmnopqrstuvwxyz'
bigAlpha='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
h=int(input(''))
g=input('')
x=False

for i in g:
        if (i not in alpha) or (i not in bigAlpha):
            print('NO')
            break
        else:
            x=True

if x:
    print('YES')

from string import ascii_lowercase
n = int(raw_input())
if n < 26:
    print "NO"
s = raw_input().lower()
ans = "YES"
for i in ascii_lowercase:
    if i not in s:
        ans = "NO"
        break
print ans

n=int(input())
word=input()
if n<24:
	print('NO')
else:
	wordset=set(word)
	if len(wordset)<24:
		print('NO')
	else:
		print('YES')

n=int(input())
a=input()
b=a.lower()
c=list()
for i in range(0,len(a)):
    c.append(a[i])
m=list(set(c))
if(len(m)==26):
    print('YES')
else :
    print('NO')

from string import ascii_lowercase as letters
n=raw_input()
s=raw_input()
print(s)

if set(list(letters))==set(list(s.lower())):
    print("YES")
else:
    print("NO")

n=int(input())
s=input()
l="asdfghjklzxcvbnmpoiuytrewq"
t=True
for i in l:
    if(i not in s or (i.upper() not in s)):
        print("NO")
        t=False
        break
    else:
        continue
if(t==True):
    print("YES")

l = int(input())
s = input()
d = 0
if l < 26:
  print("NO")
else:
  for i in range (l):
    y= s[i]
    count = s.count(y)
    d += (count-1)/count
  if (len(s)-d) >= 26:
    print ("YES")
  if (len(s)-d) <26:
    print("NO")

n = int(input())
s = input().lower()

alphabet = []

if n < 26:
    print("NO")
    exit

for i in range(0, n):
    if s[i] not in alphabet:
        alphabet.append(s[i])

if len(alphabet) < 26:
    print("NO")
else:
    print("YES")

str=input().lower()
dict1 = {chr:str.count(chr) for chr in str}
if len(list(dict1.keys())) == 26:
    print("YES")
else:
    print("no")

a= int(input())
b= input()
c= 65
d= 97
for k in range(26):
	e= chr(c)
	f= chr(d)
	if e in b or f in b:
		c += 1
		d += 1
	else:
		break
if k== 25:
	print("YES")
else:
	print("NO")

def solve(n,string):
            char=set()
            for i in range(0,n):

                        char.add(string[i].lower())
            return "YES" if len(char)==26 else"NO"

n = int(input())
s = input()
s = s.lower()
s = [i for i in s]
s = list(set(s))
s.sort()
if n < 26:
    print('NO')
else:
    print('YES')

n = int(input())
t = input().lower()
flag = 1
for i in range(len(t)-1):
	if(t[i]==t[i+1] and t[i]<=t[i+1]):
		flag = 0
		break
	else:
		flag = 1
if(flag==1 and len(t)!=1):
	print("YES")
else:
	print("NO")

import sys

def minus(a):

    print('YES' if len(a) > 26 else 'NO')

def main():
    num=int(sys.stdin.readline())
    entrada = list(sys.stdin.readline().lower())
    a=minus(entrada)
main()

n=int(input())
b=input()
a=set(b)
if len(a)>26:
   print('YES')
else:
   print('NO')

n=int(input())
t=input()
if len(set(t))==26:
    print('Yes')
else:
    print('No')

from string import ascii_lowercase as asc_lower
def check(s):
         return set(asc_lower) - set(s.lower()) == set([])
strng=input()
if (check(strng)==True):
         print("YES")
else:
         print("NO")

n = input()
n = int(n)
word = input()
mylist = []

if len(word) < 27:
    print("NO")
else:
    for c in word:
        if c not in mylist:
                mylist.extend(c)
    if len(mylist)-1 == 26:
        print("YES")
    else:
        print("NO")

k = int(raw_input().split()[0])
mm = raw_input().strip()
al = 'abcdefghijklmnopqrstuvwxyz00'
ALL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ00'
for i in mm:
    if len(ALL) == 2:
        break
    if i in al:
        k = al.find(i)
        al = al[0:k] + al[k+1:]
        ALL = ALL[0:k] + ALL[k+1:]
    if i in ALL:
        k = al.find(i)
        al = al[0:k] + al[k + 1:]
        ALL = ALL[0:k] + ALL[k + 1:]
if len(al) == 2:
    print 'YES'
else:
    print 'NO'


n = input()
n = int(n)
#print(n)
if (n < 46):
    a = 0
    while n:
        if (n >= 10):
            a = a * 10 + 9
            n -= 9;
        else:
            a = a * 10 + n
            n = 0
    print(a, a)
    exit(0)
p = 1
for i in range(1,n):
    p *= 10
    m = p // 10 * i * 45 + 1
    #print(m, p, m + p)
    if (m + p > n):
        k = n - m
        while k < 0:
            k += n
        if (k >= p):
            continue
        print(k + 1, p + k)
        exit(0)

# test code from internet
n = int( input() )
x,t=10**100-1,n-100*45*10**99%n
print(t,t+x)

def dig(n):
	return sum(map(int, list(str(n))))

def dig_sum(n): # sum of digit sum from 1 to n
	l = len(str(n))
	res = 0
	for i in range(l)[::-1]:
		a = n / 10 ** i
		if i: res += a * 45 * 10 ** (i - 1) * i
		n -= a * 10 ** i
		res += a * (a - 1) / 2 * 10 ** i
		res += (n + 1) * a
	return res

def binary(val):
	l, r = 0, val + 1
	while r - l > 1:
		mid = (l + r) / 2
		if dig_sum(mid) < val:
			l = mid
		else :
			r = mid
	return l

magic = 1000
ans = [-1] * magic
ans[0] = 0

a = int(raw_input())
x = 1

while True:
	val = dig_sum(x)
	if val % a >= magic:
		nval = val + (a - val % a)
		x = binary(nval) + 1
		continue
	val %= a
	if ans[val] != -1:
		print ans[val] + 1, x
		break
	else :
		ans[val] = x
	x += 1

from random import *
pw=[1]
for i in range(1,40): pw.append(pw[i-1]*10)
def f(x):
    	r=[]
    	while x!=0:
    		r.append(x%10)
    		x/=10
    	ans=0
    	s=0
    	r.reverse()
    	for i in range(len(r)):
    		if (i==len(r)-1): ans+=(2*s+r[i]-1)*r[i]/2
    		else: ans+=(2*s+r[i]-1)*r[i]/2*pw[len(r)-i-1]+r[i]*45*(len(r)-i-1)*pw[len(r)-i-2]
    		s+=r[i]
    	return ans
mod=input()
pos=[-1]*1000
for i in range(2,40):
  	pos[f(i)]=i
while True:
    	x=randint(1,10**30)
    	p=f(x)
    	q=p%mod
    	l,r=0,mod-q
    	while l+1<r:
    		md=(l+r)>>1
    		if (f(x+md)-p<mod-q): l=md
    		else: r=md
    	P=f(x+r)
    	Q=P%mod
    	if pos[Q]!=-1 and pos[Q]!=x+r:
    		a,b=pos[Q],x+r
    		if a>b: a,b=b,a
    		print a,b-1
    		break
    	pos[Q]=x+r

#!/usr/bin/env python

import random

def read():
    return input()

def g(n):
    strNum = str(n)

    ret = 0
    for idx in range(len(strNum)):
        digit = int(strNum[idx])

        leftNum     = int(strNum[:idx]    ) if idx > 0 else 0
        rightNum    = int(strNum[idx + 1:]) if idx + 1 < len(strNum) else 0
        rightDigits = len(strNum) - idx - 1

        # i < digit:
        ret += (digit * (digit - 1) / 2)              * (leftNum  + 1) * (10 ** rightDigits)

        # i > digit:
        ret += (9 * 10 / 2 - digit * (digit + 1) / 2) * (leftNum     ) * (10 ** rightDigits)

        # i == digit:
        ret += digit * (leftNum     ) * (10 ** rightDigits)
        ret += digit * (rightNum + 1)

    return ret

def work(a):
    mul = 1
    while mul:
        L = 0
        R = mul * a
        while L < R:
            mid = (L + R) / 2

            if g(mid) >= mul * a:
                R = mid
            else:
                L = mid + 1

        if g(L) == mul * a:
            print 1, L
            break

        mul += 1

if __name__ == "__main__":
    work(read())

pow_l = 50
cnt = 10 ** (pow_l - 1)
cnt *= 45
cnt *= pow_l
cnt += 1

l = 1
r = 10 ** pow_l

mod = int(raw_input())
cnt %= mod
if (cnt == 0):
    print l, r
else:
    print l + (mod - cnt), r + (mod - cnt)

'''
Genius Idea from editorial solution 4:
Since f(x+1e18)=f(x)+1,
g(l+1,l+1e18+1)=1+g(l,l+1e18)
Now let x=g(0,1e18-1)%a
Therefore, we can construct the answer as: l=(a-x),r=(a-x+1e18-1), here we are shifting by a-x so that g(a-x,a-x+1e18-1)%a becomes 0
'''
def solve():
	a=input()
	x=(45*18*(10**17))%a
	print(str(a-x)+' '+str(a-x+(10**18)-1))
solve()

import itertools
import math

a = int(raw_input())

for k in range(1,1000):
    x = a * k
    for keta in range(1,20):
        pow10keta = 1
        for i in range(0,keta):
            pow10keta = pow10keta * 10
        start = 45 * keta * pow10keta/10 + 1
        end   = start + 9 * pow10keta - 1
        if start<=x and x<= end:
            r = pow10keta + x - start
            l = r + 1 - pow10keta
            print int(l),int(r)
            exit(0)

from random import randint

def stupid(n):
    ret = 0
    for i in range(1, n + 1):
        ret += sum([int(c) for c in str(i)])
    return ret

ans_10 = [0]
for i in range(1, 202):
    ans_10.append(45 * 10 ** (i - 1) + ans_10[-1] * 10)

def solve(n):
    s = str(n)
    sz = len(s)
    ans = 0
    so_far = 0
    for i in range(sz):
        cur = int(s[i])
        for j in range(cur):
            ans += (so_far + j) * 10 ** (sz - i - 1) + ans_10[sz - i - 1]
        so_far += cur
    return ans + so_far

def f(L, R):
    return solve(R) - solve(L - 1)

a = input()

for i in range(1500):
    t = randint(10 ** 6, 10 ** 18)

    val = solve(t) % a

    L = 2
    R = t
    while R - L > 1:
        M = (L + R) // 2
        if solve(t + M) % a > val:
            R = M
        else:
            L = M

    if f(t + 1, t + L) % a == 0:
        print t + 1, t + L
        break

#!/usr/bin/python

from sys import stdin

def f(x):
   return sum(map(int, list(str(x))))

def fsum(x):
    n = len(str(x))
    res = 0
#    res2 = sum([f(i) for i in range(x+1)])
    for i in range(n)[::-1]:
        a = x // 10**i
        if i:
           res += a * (45 * 10**(i-1) * i)
        x = x - a * 10**i
        res += a * (a - 1) // 2 * 10**i
        res += (x + 1) * a
    return res;
#    print res, res2
#    assert(res == res2)

def lb(val):
    l = 0
    r = val + 1
    while r - l > 1:
        m = (l + r) // 2
        if fsum(m) < val:
            l = m
        else:
            r = m
    return l

magic = 1000

anss = [-1] * magic
anss[0] = 0

a = int(stdin.read())

x = 1

while True:
    val = fsum(x)
    if val % a >= magic:
       nval = val + (a - val % a)
       x = lb(nval) + 1
       continue
    val = val % a
    if anss[val] != -1:
       print anss[val]+1, x
#       assert((fsum(x) - fsum(anss[val])) % a == 0)
       break
    else:
       anss[val] = x
    x = x + 1

a = int(raw_input())

def s(n):
    r = 0
    while n > 0:
        r += n % 10
        n /= 10
    return r

def s1(n):
    if n < 10:
        return sum(range(0, n + 1))
    D = n % 10
    r = 0
    for d in range(10):
        if d <= D:
            r += d*(n / 10 + 1)
        else:
            r += d*(n / 10)
    r += s(n / 10) * (D + 1)
    r += s1((n / 10) - 1) * 10
    return r

def s2(n):
    r = 0
    for i in range(n + 1):
        r += s(i)
    return r

was = {}
was[0] = 0

x = 0
while True:
    assert x / a < 30
    x += a
    l = 0
    r = max(a, 100)
    while l + 1 < r:
        m = (l + r) / 2
        if s1(m) < x:
            l = m
        else:
            r = m
    k = s1(r) % a
    assert k < 2000
    if k in was:
        print was[k] + 1, r
        break

    was[k] = r

try:
    while True:
        a = int(input())
        b = (10 ** 17) % a
        b = (b * 45 * 18+ 1) % a
        print(1 + (a-b), int(1e18) + (a-b))
except EOFError:
    pass

a = int(input())

l = 1
r = 10**200

cur = [0]
cnt = [1]
for i in range(300):
	cur.append(cur[-1] * 10 + 45 * cnt[-1])
	cnt.append(cnt[-1] * 10)

def calc(x):
	global cur
	global cnt
	res = 0
	a = [int(i) for i in str(x)]
	tot = 0
	for i in range(len(a)):
		if (a[i] != 0):
			for j in range(a[i]):
				res += (tot + j) * cnt[len(a) - i - 1]
			res += a[i] * cur[len(a) - i - 1]
		tot += a[i]
	res += tot
	return res

while (l < r - 1):
	m = (l + r) // 2
	if (calc(m) < a):
		l = m
	else:
		r = m

if (calc(l) >= a):
	r = l

cur = calc(r)
l = 1

def get(x):
	res = 0
	while (x):
		res += x % 10
		x //= 10
	return res

while (cur % a != 0):
	cur -= get(l)
	l += 1
	while (cur < a):
		r += 1
		cur += get(r)

print(l, r)

A = int(input());
start = (45*10**18*19+1)%A;
start = A-start;
print(start+1, start+10**19);

#!/usr/bin/python3
import math

A = [0]*250

A[0] , A[1] = 0 , 45

for i in range(2,250):
	A[i] = A[i-1]*10 + 45*pow(10,i-1)

def tot(n):
	if n < 10: return (n*(n+1))//2
	d = len(str(n))-1
	p = pow(10,d)
	msd = n//p
	return msd*A[d] + ((msd*(msd-1))//2)*p + msd*(1+n%p) + tot(n%p)

a = int(input())
lo , hi = 1 , a

while lo < hi:
	mid = (lo+hi)>>1
	if tot(mid) >= a: hi = mid
	else : lo = mid+1

i1 , i2 = 1 , hi
total = tot(hi)

def digSum(n):
	total = 0
	while n>0:
		total += n%10
		n //= 10
	return total

while total%a != 0:
	if total < a:
		i2 += 1
		total += digSum(i2)
	else:
		total -= digSum(i1)
		i1 += 1
print(i1,i2)

n=int(input())
x=10**18
k=(774*x)%n
def inv(a):
  for i in range(a):
    if i*n+1==(i*n+1)//a*a:
      return (i*n+1)//a

if n%9==0:
  offset=k//9
elif n%3==0:
  n//=3
  k//=3
  offset=(k*inv(3))%n
else:
  offset=(k*inv(9))%n
l=x-offset
r=10*x-1-offset
print(str(l)+" "+str(r))

a=int(input())

x=a-((10**21)*9)%a

print(x,10**20+x-1)

# Made By Mostafa_Khaled

def g (x):
    global arr
    z = 0
    while 10 ** z <= x:
        z += 1
    z -= 1
    ans = 0
    while x > 0:
        y = x // 10 ** z
        ans += 10 ** z * y * (y - 1) // 2
        ans += y * arr[z]
        ans += y * (x % 10 ** z)
        x %= 10 ** z
        z -= 1
    return ans

def f(x):
    r = 0
    while x > 0:
        r += x % 10
        x //= 10
    return r

n = 100
arr = [0] * n
for i in range(1, n):
    arr[i] = 45 * 10 ** (i - 1) + 10 * arr[i - 1]
for i in range(n):
    arr[i] += 1
a = int(input())
ans = [-1] * 1000
for i in range(1, 1000):
    L, R = 1, 10 ** 30
    while R - L > 1:
        M = (L + R) // 2
        if g(M) - f(M) > i * a:
            R = M
        else:
            L = M
    x = g(R) % a
    if ans[x] != -1:
        print(ans[x], R)
        break
    else:
        ans[(g(R) - f(R)) % a] = R

import random
import sys

def f(n, mod):
	l=[]
	while n>0:
		l.append(n%10)
		n//=10
	ret=0
	num=0
	suma=0
	war=1
	for i in l:
		a=0
		b=0

		for j in range(i):
			a=(a+suma+j*war)%mod
		a=(a+ret+i*(num+1))%mod

		for j in range(10):
			b=(b+suma+j*war)%mod

		ret=a
		suma=b

		num=(num+war*i)%mod
		war=(war*10)%mod
	return ret

def los(dlu):
	ret=0
	for i in range(dlu):
		ret=ret*10+random.randint(0, 9)
	return ret

def ans(a, b):
	print(a, b)
	sys.exit(0)

pam=[(0, 0)]

mod=int(input())

while True:
	a=los(42)
	b=a+los(20)
	if a==b:
		continue
	if a>b:
		a,b=b,a
	wa=f(a, mod)
	wb=f(b, mod)
	if wa==wb:
		ans(a+1, b)
	if wa<wb:
		continue
	#~ print("jade")
	while a+1<b:
		s=(a+b)//2
		ws=f(s, mod)
		#~ if ws==0:
			#~ ans(1, s)
		if ws<=wb:
			b=s
			wb=ws
		else:
			a=s
			wa=ws
	for i in pam:
		if i[1]==wb:
			ans(min(i[0], b)+1, max(i[0], b))
	pam.append((b, wb))

#!/usr/bin/env python
#-*- coding:utf-8 -*-

import math

a = int(raw_input())
r = int(math.ceil(math.log(a, 10))) + 1
z = (45 * r * pow(10, r - 1, a) + 1) % a
x = a - z
print x, 10 ** r + x
# print fsum(10**5 + 100) - fsum(100) - fsum(10**5)
# print fsum(11010), fsum(10000) + 1010 + fsum(1000) + 10 + fsum(10)

#!/usr/bin/env python
#-*- coding:utf-8 -*-

import math

a = int(raw_input())
r = int(math.ceil(math.log(a, 10))) + 1
z = (45 * r * pow(10, r - 1, a) + 1) % a
x = a - z
print 10 ** r + x, x
# print fsum(10**5 + 100) - fsum(100) - fsum(10**5)
# print fsum(11010), fsum(10000) + 1010 + fsum(1000) + 10 + fsum(10)

#Thanks to http://codeforces.com/profile/ZhouYuChen

'''def s(x):
	if(x==0):
		return 0
	return x+s(x-1)

def calc(x):
	m=1
	ans=0
	while(x):
		ans2=s(x%10)
		x/=10
		ans2+=(45*x)
		ans2*=m
		ans+=ans2
		m*=10
	return ans

def bc(x):
	ans=0
	while(x):
		ans+=x%10
		x/=10
	return ans

def brute(x):
	ans=0
	while(x>0):
		ans+=bc(x)
		x-=1
	return ans

a=int((raw_input()))
print calc(a), brute(a) '''

a=int(raw_input())
s=(45*(10**101))
k=(a-s)%a
print k,(10**100)+k-1

#Thanks to http://codeforces.com/profile/ZhouYuChen

'''def s(x):
	if(x==0):
		return 0
	return x+s(x-1)

def calc(x):
	m=1
	ans=0
	while(x):
		ans2=s(x%10)
		x/=10
		ans2+=(45*x)
		ans2*=m
		ans+=ans2
		m*=10
	return ans

def bc(x):
	ans=0
	while(x):
		ans+=x%10
		x/=10
	return ans

def brute(x):
	ans=0
	while(x>0):
		ans+=bc(x)
		x-=1
	return ans

a=int((raw_input()))
print calc(a), brute(a) '''

a=int(raw_input())
s=45*(10**102)%a
k=(a-s)%a
print k,(10**101)+k-1

#Thanks to http://codeforces.com/profile/ZhouYuChen

'''def s(x):
	if(x==0):
		return 0
	return x+s(x-1)

def calc(x):
	m=1
	ans=0
	while(x):
		ans2=s(x%10)
		x/=10
		ans2+=(45*x)
		ans2*=m
		ans+=ans2
		m*=10
	return ans

def bc(x):
	ans=0
	while(x):
		ans+=x%10
		x/=10
	return ans

def brute(x):
	ans=0
	while(x>0):
		ans+=bc(x)
		x-=1
	return ans

a=int((raw_input()))
print calc(a), brute(a) '''

a=int(raw_input())
s=(45*(10**101))
k=(a-s)%a
print k,(10**101)+k-1

#!/usr/bin/env python

import random

def read():
    return input()

def g(n):
    strNum = str(n)

    ret = 0
    for idx in range(len(strNum)):
        if idx == 0:
            digit = int(strNum[idx])
            for i in range(1, digit):
                ret += i * (10 ** (len(strNum) - idx - 1))
            ret += digit * (int(strNum[1:]) + 1)
        else:
            for i in range(1, 10):
                ret += i * (10 ** (len(strNum) - idx - 1))

    return ret

def work(a):

    while 1:
        v = random.randrange(2, 10 ** 199)
        gv = g(v)

        L = 0
        R = a + 1
        while L < R:
            mid = (L + R) / 2

            if g(v + mid) - gv >= a + 1:
                R = mid
            else:
                L = mid + 1

        if g(v + L) - gv == a + 1:
            print 1, v + L
            break

if __name__ == "__main__":
    work(read())

#!/usr/bin/env python

import random

def read():
    return input()

def g(n):
    strNum = str(n)

    if len(strNum) == 1:
        return n * (n + 1) / 2

    ret = 0
    for idx in range(len(strNum)):
        if idx == 0:
            digit = int(strNum[idx])
            for i in range(1, digit):
                ret += i * (10 ** (len(strNum) - idx - 1))
            ret += digit * (int(strNum[1:]) + 1)
        else:
            for i in range(1, 10):
                ret += i * (10 ** (len(strNum) - idx - 1))

    return ret

def work(a):
    while 1:
        v = random.randrange(2, 10 ** 199)
        gv = g(v)

        L = 0
        R = a
        while L < R:
            mid = (L + R) / 2

            if g(v + mid) - gv >= a:
                R = mid
            else:
                L = mid + 1

        if g(v + L) - gv == a:
            print 1, v + L
            break

if __name__ == "__main__":
    work(read())

from math import inf as inf
from math import *
from collections import *
import sys
from itertools import permutations
input=sys.stdin.readline
t=1
while(t):
    t-=1
    n=int(input())
    f=45*20*(10**19)%n
    print(f,f+(10**20-1))

n = input()
n = int(n)
#print(n)
if (n < 46):
    a = 0
    while n:
        if (n >= 10):
            a = a * 10 + 9
            n -= 9;
        else:
            a = a * 10 + n
            n = 0
    if a == 1:
        a = a + 1
    print(a - 1, a)
    exit(0)
p = 1
for i in range(1,n):
    p *= 10
    m = p // 10 * i * 45 + 1
    #print(m, p, m + p)
    if (m + p > n):
        k = n - m
        while k < 0:
            k += n
        if (k >= p):
            continue
        print(k + 1, p + k)
        exit(0)

n = input()
n = int(n)
#print(n)
if (n < 46):
    a = 0
    while n:
        if (n >= 10):
            a = a * 10 + 9
            n -= 9;
        else:
            a = a * 10 + n
            n = 0
    print(a, a - 1)
    exit(0)
p = 1
for i in range(1,n):
    p *= 10
    m = p // 10 * i * 45 + 1
    #print(m, p, m + p)
    if (m + p > n):
        k = n - m
        while k < 0:
            k += n
        print(k + 1, p + k)
        exit(0)

n = input()
n = int(n)
#print(n)
if (n < 46):
    a = 0
    while n:
        if (n >= 10):
            a = a * 10 + 9
            n -= 9;
        else:
            a = a * 10 + n
            n = 0
    print(a, a - 1)
    exit(0)
p = 1
for i in range(1,n):
    p *= 10
    m = p // 10 * i * 45 + 1
    #print(m, p, m + p)
    if (m + p > n):
        k = n - m
        while k < 0:
            k += n
        if (k >= p):
            continue
        print(k + 1, p + k)
        exit(0)

n = input()
n = int(n)
#print(n)
if (n < 46):
    a = 0
    while n:
        if (n >= 10):
            a = a * 10 + 9
            n -= 9;
        else:
            a = a * 10 + n
            n = 0
    if a == 1:
        a = a + 1
    print(a, a - 1)
    exit(0)
p = 1
for i in range(1,n):
    p *= 10
    m = p // 10 * i * 45 + 1
    #print(m, p, m + p)
    if (m + p > n):
        k = n - m
        while k < 0:
            k += n
        if (k >= p):
            continue
        print(k + 1, p + k)
        exit(0)

from random import randint
def main():
    a = int(raw_input())
    t = 0
    dp = [0, 45 % a]
    d = [1, 10]
    for i in xrange(1, 21):
        dp.append((dp[-1] * 10 + 45 * d[-1]) % a)
        d.append(d[-1] * 10 % a)
    def f(xx, x):
        res = 0
        i = 0
        t = 1
        while x:
            y = x % 10
            res += dp[i] * y % a
            res += y * (y - 1) / 2 * d[i] % a
            res %= a
            res += t * y
            res %= a
            t = y * d[i] + t
            t %= a
            x /= 10
            i = i + 1
        xx = x
        while x:
            y = x % 10
            res += dp[i] * y % a
            res += y * (y - 1) / 2 * d[i] % a
            res %= a
            res += t * y
            res %= a
            t = y * d[i] + t
            t %= a
            x /= 10
            i = i + 1
        return res
    di = dict()
    while 1:
        ru, rd = randint(1, 10 ** 9), randint(1, 10 ** 9)
        k = f(ru, rd)
        if k in di:
            if di[k] != (ru, rd):
                s, t = di[k], (ru, rd)
                if s > t: s, t = t, s
                s = s[0] * 1000000000 + s[1] + 1
                t = t[0] * 1000000000 + t[1]
                print s, t
            return
        else:
            di[k] = (ru, rd)
main()

from random import randint
def main():
    a = int(raw_input())
    t = 0
    dp = [0, 45 % a]
    d = [1, 10]
    for i in xrange(1, 21):
        dp.append((dp[-1] * 10 + 45 * d[-1]) % a)
        d.append(d[-1] * 10 % a)
    def f(x, xx):
        res = 0
        i = 0
        t = 1
        while x:
            y = x % 10
            res += dp[i] * y % a
            res += y * (y - 1) / 2 * d[i] % a
            res %= a
            res += t * y
            res %= a
            t = y * d[i] + t
            t %= a
            x /= 10
            i = i + 1
        xx = x
        while x:
            y = x % 10
            res += dp[i] * y % a
            res += y * (y - 1) / 2 * d[i] % a
            res %= a
            res += t * y
            res %= a
            t = y * d[i] + t
            t %= a
            x /= 10
            i = i + 1
        return res
    di = dict()
    while 1:
        ru, rd = randint(1, 10 ** 9), randint(1, 10 ** 9)
        k = f(ru, rd)
        if k in di:
            if di[k] != (ru, rd):
                s, t = di[k], (ru, rd)
                if s > t: s, t = t, s
                s = s[0] * 1000000000 + s[1] + 1
                t = t[0] * 1000000000 + t[1]
                print s, t
            return
        else:
            di[k] = (ru, rd)
main()

A = int(raw_input())
pow10 = 10 ** 20

s = (int(4.5 * 20) * pow10) % A
#think about the offset
A = (A - s) % A
print A, A + pow10 - 1

#!/usr/bin/env python2

def sumfunc(k):
  return 45 * 10 ** (k - 1) * k

a = int(input())
val = sumfunc(18)
val %= a
rev = (a - val) % a
if rev == 0:
  print(1, 10 ** 18 - 1)
else:
  print(rev, 10 ** 18 + rev - 1)

import itertools
import math

a = int(raw_input())

for k in range(1,11):
    x = a * k
    for keta in range(1,20):
        pow10keta = 1
        for i in range(0,keta):
            pow10keta = pow10keta * 10
        start = 45 * keta * pow10keta/10 + 1
        end   = start + 9 * pow10keta - 1
        if start<=x and x<= end:
            r = pow10keta + x - start
            l = r + 1 - pow10keta
            print int(l),int(r)
            exit(0)

import itertools
import math

a = int(raw_input())

for k in range(1,1000000):
    x = a * k
    for keta in range(1,100):
        pow10keta = 1
        for i in range(1,keta):
            pow10keta = pow10keta * 10
        start = 45 * keta * pow10keta/10 + 1
        end   = start + 9 * pow10keta - 1
        if start<=x and x<= end:
            r = pow10keta + x - start
            l = r + 1 - pow10keta
            print int(l),int(r)
            exit(0)

import itertools
import math

a = int(raw_input())

for k in range(1,1000):
    x = a * k
    for keta in range(1,100):
        pow10keta = math.pow(10,keta)
        start = 45 * keta * pow10keta/10 + 1
        end   = start + 9 * pow10keta - 1
        if start<=x and x<= end:
            r = pow10keta + x - start
            l = r + 1 - pow10keta
            print int(l),int(r)
            exit(0)

import itertools
import math

a = int(raw_input())

for k in range(1,1000000):
    x = a * k
    for keta in range(1,100):
        pow10keta = math.pow(10,keta)
        start = 45 * keta * pow10keta/10 + 1
        end   = start + 9 * pow10keta - 1
        if start<=x and x<= end:
            r = pow10keta + x - start
            l = r + 1 - pow10keta
            print int(l),int(r)
            exit(0)

A = int(input());
start = (45*10**18*18+1)%A;
start = A-start;
print(start+1, start+10**19);

#!/usr/bin/env python3

def sumfunc(k):
    return 45 * 10 ** (k - 1) * k

a = int(input())
val = sumfunc(18)
val %= a
rev = (a - val) % a
if rev == 0:
    print(1, 10 ** 18)
else:
    print(rev, 10 ** 18 + rev - 1)

def c(x):
    return int(45 * x * 10**x//10 + 1)

a = int(input())
for i in range(1, 100):

    x = c(i)
    x %= a
    want = (1-x)%a
    if want != 0:
        print(want, want + 10**i - 1)
        quit()

def c(x):
    return int(45 * x * 10**x//10 + 1)

a = int(input())
for i in range(18, 100):

    x = c(i)
    x %= a
    want = (1-x)%a
    if want != 0:
        print(want, want + 10**i - 1)
        quit()

def main():
    a = int(input())

    def digits(n):
        while n > 0:
            yield n % 10
            n //= 10

    def F(n):
        res = 5 * n
        _r = 0
        for di in digits(n):
            _r += di * (di - 9)
        return res + _r//2

    #j = 1
    #while (F(a+j-1)-F(j-1)) % a:
    #    j*=2
    for i in [9, 99, 999, 9999, 99999]:
        res = 0
        for j in range(i+1):
            for di in digits(j):
                res += di
        print(i, F(i), res)

if __name__ == '__main__':
    main()

from math import ceil, log10

def main():
    a = int(input())

    n = ceil(log10(a))
    x = (45*n*10**(n-1)+1)%a
    print(a-x+1, 10**n+a-x)

    def digits(n):
        while n > 0:
            yield n % 10
            n //= 10

    for i in range(200):
        res = 0
        for j in range(i+1):
            for di in digits(j):
                res += di
        print(i, res)

if __name__ == '__main__':
    main()

def main():
    a = int(input())

    def digits(n):
        while n > 0:
            yield n % 10
            n //= 10

    def F(n):
        res = 5 * n
        _r = 0
        for di in digits(n):
            _r += di * (di - 9)
        return res + _r//2

    j = 1
    while (F(a+j-1)-F(j-1)) % a:
        j*=2

    print(j, a+j-1)

if __name__ == '__main__':
    main()

from math import ceil, log10

def main():
    a = int(input())

    n = ceil(log10(a))
    x = (45*n*10**(n-1)+1)%a
    print(a-x+1, 10**n+a-x)

if __name__ == '__main__':
    main()

def main():
    a = int(input())

    def digits(n):
        while n > 0:
            yield n % 10
            n //= 10

    def F(n):
        res = 5 * n
        _r = 0
        for di in digits(n):
            _r += di * (di - 9)
        return res + _r//2

    j = 1
    while (F(a+j)-F(j-1)) % a:
        j*=2

    print(j, a+j)

if __name__ == '__main__':
    main()

n=int(input())
x=10**18
k=(774*x)%n
def inv(a):
  for i in range(a):
    if i*n+1==(i*n+1)//a*a:
      return (i*n+1)//a

if n%9==0:
  offset=k//9
elif n%3==0:
  n//=3
  k//=3
  offset=(k*inv(3))%n
else:
  offset=(k*inv(9))%n
l=x-1-offset
r=10*x-1-offset
print(str(l)+" "+str(r))

def g (x):
    global arr
    z = 0
    while 10 ** z <= x:
        z += 1
    z -= 1
    ans = 0
    while x > 0:
        y = x // 10 ** z
        ans += 10 ** z * y * (y - 1) // 2
        ans += y * arr[z]
        ans += y * (x % 10 ** z)
        x %= 10 ** z
        z -= 1
    return ans

def f(x):
    r = 0
    for i in range(x + 1):
        j = i
        while j > 0:
            r += j % 10
            j //= 10
    return r

n = 100
arr = [0] * n
for i in range(1, n):
    arr[i] = 45 * 10 ** (i - 1) + 10 * arr[i - 1]
for i in range(n):
    arr[i] += 1
a = int(input())
ans = [-1] * 1000
for i in range(1, 1000):
    L, R = 1, 10 ** 100
    while R - L > 1:
        M = (L + R) // 2
        if g(M) > i * a:
            R = M
        else:
            L = M
    x = g(R) % a
    if ans[x] != -1:
        print(ans[x], R)
        break
    else:
        ans[x] = R

pow_l = 50
cnt = 10 ** (pow_l - 1)
cnt *= 45
cnt += 1

l = 1
r = 10 ** pow_l

mod = int(raw_input())
cnt %= mod
if (cnt == 0):
    print l, r
else:
    print l + (mod - cnt), r + (mod - cnt)

pow_l = 1
cnt = 10 ** (pow_l - 1)
cnt *= 45
cnt += 1

l = 1
r = 10 ** pow_l

mod = int(raw_input())
cnt %= mod
if (cnt == 0):
    print l, r
else:
    print l + (mod - cnt), r + (mod - cnt)

import sys

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

rem = (19 * 45 * 10**18) % n
rem = (n-rem) % n

lo = 10**19 - (10**19 - rem)
hi = lo + 10**19 - 1

print str(lo) + ' ' + str(hi)

try:
    while True:
        a = int(input())
        x = a - ((10**20)*9) % a
        print(x, 10**19+x-1)
except EOFError:
    pass

try:
    while True:
        a = int(input())
        x = a - ((10**19)*9) % a
        print(x, 10**18+x-1)
except EOFError:
    pass


import math
n = int(raw_input())
if math.sqrt(8*n+1) % 1 != 0:
    print 'NO'
else:
    print 'YES'

def main():
	nums = set([x*(x+1)/2 for x in range(50)])
	if input() in nums:
		print 'YES'
	else:
		print 'NO'

main()

n=input()

ans="NO"

for i in range(1,500):
	if (i*i)+i==2*n:
		ans="YES"
print ans

t = [(n*(n+1))/2 for n in range(0,33)]
print "YES" if int(raw_input()) in t else "NO"

# Solution by [A.S.]

n = int(raw_input())
ok=1
for i in range(0,501):
	if i*(i+1)//2==n:
		print "YES";
		ok=2
		break

if ok==1:
	print "NO";

#!/usr/bin/env python
"""(c) gorlum0 [at] gmail.com"""
from sys import stdin

for t in map(int, stdin):
    D = 1 + 8*t
    x = int((-1 + D**0.5) / 2)
    triangular = t == x*(x+1) // 2
    print 'YES' if triangular else 'NO'

T=[]
for i in range(35):
	a=i*(i+1)/2
	T.append(a)
n=int(raw_input())
if n in T:
	print 'YES'
else:
	print 'NO'

triangulars = [(n*(n+1))/2 for n in xrange(50)]

if int(raw_input()) in triangulars:
    print "YES"

else:
    print "NO"

from math import sqrt
n = int(input())
x = 0.5*(sqrt(8*n + 1) -1)
if x==int(x):
    print("YES")
else : print("NO")

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import time
import sys, io
import re, math
#start = time.clock()
n=input()
for i in range(1,500):
    if (i*(i+1))/2>n:
        break
    elif (i*(i+1))/2==n:
        print 'YES'
        sys.exit()
print 'NO'

tri = []

for i in range(1, 500):
    tri.append((i * (i + 1)) // 2)

n = int(input())

print('NO' if n not in tri else 'YES')

import sys
import string

if __name__ == '__main__':

    num1 = map(int,sys.stdin.readline().split())

    temp = 0
    for i in range(35):

        if num1[0] > temp:
            temp+=i

        elif num1[0] == temp:
            print "YES"
            break
        else:
            print "NO"
            break

n = int(raw_input())
i = 1
t = 0
flag = False
while True:
    t = i * (i + 1) / 2
    if t == n:
        flag = True
        break
    if t > 500:
        break
    i += 1
if flag:
    print 'YES'
else:
    print 'NO'

tri = []

i = 0
while ( i*(i+1)/2 )  <= 500:
	tri.append( i*(i+1)/2 )
	i += 1

n = input()

if n in tri:
	print("YES")
else:
	print("NO")

a = int(input())
k = 0
for i in range(1, 501):
    if(i*(i+1)==2*a):
        print("YES")
        k = 1
        break
if(k==0):
    print("NO")

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
input = sys.stdin
output = sys.stdout

from math import sqrt

def is_triangle_number(x):
    D = 1+8*x
    d = int(sqrt(D))
    return d*d == D and (1+d) % 2 == 0

def solve(n):
    if is_triangle_number(n):
        return 'YES'
    else:
        return 'NO'

n = int(input.readline())
assert 1<=n and n<=500

a = solve(n)
output.write('%s\n' % a)

a = int(input())
test=[]
i=1
t_n=0
while t_n<=a:
    t_n= i*(i+1)//2
    test.append(t_n)
    i=i+1

if int(a) in test:
    print("YES")
else:
    print("NO")

# Author: SaykaT
# Problem: 47A
# Time Created: July 21(Tuesday) 2020 || 04:24:31

#>-------------------------<#
from math import sqrt

# Helper Functions. -> Don't cluster your code.

# IO Functions. -> Input output
def io():
    n = int(input())
    return n

# Main functions. -> Write the main solution here
def solve():
    n = io()
    a = float(1)
    b = float(1)
    c = -float(n * 2)

    d = (b ** 2) - (4 * a * c)
    sol1 = (-b + sqrt(d)) / (2 * a)
    sol2 = (-b - sqrt(d)) / (2 * a)
    if n == 1:
        print('YES')
    elif sol1 > 1:
        if float(int(sol1)**2) == ((sol1 ** 2)):
            print('YES')
        else:
            print('NO')
    elif sol2 > 1:
        if sol2 == ((sol2 ** 2) ** 0.5):
            print('YES')
        else:
            print('NO')
    else:
        print('NO')

# Multiple test cases. -> When you have T test cases.
solve()

n=int(input())
l=[(i*(i+1))//2 for i in range(1,33)]
if n in l:
	print("YES")
else:
	print("NO")

n = input()
if int((8*n+1)**0.5)**2 == 8*n+1:
	print 'YES'
else:
	print 'NO'

from math import sqrt
if(sqrt(int(input()) * 8 + 1).is_integer()):
    print("YES")
else:
    print("NO")

# submit
t = int(raw_input())
a = [n * (n + 1) / 2 for n in range(1, 501)]
print "YES" if t in a else "NO"

s = set()
for i in range(31):
  s.add(int((i+1) *(i+2)/2))

n = int(input())
print('YES' if n in s else 'NO')

l=list()
for i in range(1,33):
    l.append(int((i*(i+1))/2))
n=int(input())
if n in l:
    print("YES")
else:
    print("NO")

# ===============================================================================================
# importing some useful libraries.
from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb  # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
# If the element is already present in the list,

# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect

# If the element is already present in the list,
# the right most position where element has to be inserted is returned

# ==============================================================================================
# fast I/O region

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        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

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
            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")

def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

# ===============================================================================================
### START ITERATE RECURSION ###
from types import GeneratorType

def iterative(f, stack=[]):
    def wrapped_func(*args, **kwargs):
        if stack: return f(*args, **kwargs)
        to = f(*args, **kwargs)
        while True:
            if type(to) is GeneratorType:
                stack.append(to)
                to = next(to)
                continue
            stack.pop()
            if not stack: break
            to = stack[-1].send(to)
        return to

    return wrapped_func

#### END ITERATE RECURSION ####

# ===============================================================================================
# some shortcuts

mod = 1000000007

def inp(): return sys.stdin.readline().rstrip("\r\n")  # for fast input

def out(var): sys.stdout.write(str(var))  # for fast output, always take string

def lis(): return list(map(int, inp().split()))

def stringlis(): return list(map(str, inp().split()))

def sep(): return map(int, inp().split())

def strsep(): return map(str, inp().split())

def zerolist(n): return [0] * n

def nextline(): out("\n")  # as stdout.write always print sring.

def testcase(t):
    for p in range(t):
        solve()

def printlist(a):
    for p in range(0, len(a)):
        out(str(a[p]) + ' ')

def solve():
    ar=[1]
    for i in range(2,505):
        ar.append(ar[-1]+i)
    n=int(inp())
    if n in ar:
        print("YES")
    else:
        print("NO")

solve()

n = int(input())
S = set()
for i in range(1, 100):
    s = i*(i+1)//2
    S.add(s)
if n in S:
    print('YES')
else:
    print('NO')

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("YES")
        exit()
print("NO")

a = int(input())
yes = 0
for i in range(50):
    if (i * (i + 1)) // 2 == a:
        yes = 1
        break
print('YES' if yes == 1 else 'NO')

import sys
from collections import *
from math import *
import re
def sieve(n):
    prime=[True for i in range(n+1)]
    p=2
    while p*p<=n:
        if prime[p]==True:
            for i in range(p*p,n+1,p):
                prime[i]=False
        p+=1
    c=0
    for i in range(2,n):
        if prime[i]:
            #print(i)
            c+=1
    return c

def iseven(n):return[False,True][0 if n%2 else 1]
def inp_arr():return list(map(int,input().split()))
def inp():return map(int,input().split())
def lcm(a,b):return (a*b)/gcd(a,b)
max_int = sys.maxsize
mod = 10**9+7

an=[n*(n+1)/2 for n in range(1,501)]
n=int(input())
print('YES' if n in an else 'NO')

n = int(input())
ans = 0
for i in range(35):
    num = i * (i+1) // 2
    if num == n:
        ans = 1
        break
print("YES" * ans + "NO" * ( 1 - ans))

triangular = [n*(n+1)/2 for n in range(1,501)]
num = int(input())
print("YES" if num in triangular else "NO")

x = int(input())
b = 0
a=0
while b < 50 :
    n = (b*(b+1)//2)
    if ( n == x):
        a = n
        print ("YES")
        break
    b = b+1

if ( a == 0 ):
    print ("NO")

num = int(input())
for i in range(500):
    if (i*(i+1)/2) == num:
        print("YES")
        quit()
print("NO")

import sys
from array import array  # noqa: F401

def input():
    return sys.stdin.buffer.readline().decode('utf-8')

n = int(input())
for i in range(1, 100):
    if n == i * (i + 1) // 2:
        print('YES')
        exit()
print('NO')

def R(): return map(int, input().split())
def I(): return int(input())
def S(): return str(input())

def L(): return list(R())

from collections import Counter

import math
import sys

n=I()

n2=(-1+math.sqrt(1+8*n))/2

print(['NO','YES'][n2==int(n2)])

n= int(input()); p=0
for i in range(n+1):
     if i*(i+1)//2==n:
        p=1
        break
if p==1:
    print("YES")
else:
    print("NO")

n = int(raw_input())
for x in xrange(1, 501):
    if x*(x+1)/2 == n:
        print "YES"
        exit(0)
print "NO"

import math

T = int(input())

D = 1 + 8*T
sq = math.sqrt(D)

if sq != int(sq) :
    print "NO"
else :
    n = int(sq) - 1
    if n % 2 == 0:
        print "YES"
    else :
        print "NO"

n=int(input())
f=0
for i in range(1,n+1):
	if (i*(i+1))//2==n:
		f=1
		break
if f==1:
	print("YES")
else:
	print("NO")

n = int(input())
flag = 0
for i in range(1, n + 1):
    if (i * (i + 1)) // 2 == n:
        flag = 1
        print("YES")
        break
if flag == 0:
    print("NO")

n = int(input())
temp = 0
for i in range(1,501):
    temp+=i
    if(temp==n):
        print("YES")
        exit()
    if(temp>n):
        print("NO")
        exit()

t=int(input())
for n in range(1,t+1):
	if 2*t==n*(n+1):
		print('YES')
		break
else:
	print('NO')

n=int(input())
i=1
t=1
while(t<n):
    i+=1
    t+=i
if(t==n):
    print("YES")
else:
    print("NO")

n = int(input())
i = 1
p = int(i*(i+1)/2)
while(p<=n):
    if p == n:
        print('YES')
        exit()
    else:
        i += 1
        p = int(i*(i+1)/2)
print('NO')

import math
Number=int(input())
Temp=math.sqrt(Number*8+1)
if Temp==int(Temp):
	print("YES")
else:
	print("NO")

number = [0] * 32
n = int(input())
i = 1
for i in range(0, 32):
    number[i] = (i * (i + 1)) // 2

mid = 16
left = 0
right = 31

while number[mid] != n and left <= right:
    if n > number[mid]:
        left = mid + 1
    else:
        right = mid - 1
    mid = (left + right) // 2

if left > right:
    print('NO')
else:
    print('YES')

n=int(input())
l=[(i*(i+1))//2 for i in range(1,33)]
if n in l:
	print("YES")
else:
	print("NO")

a = int(input())
b =0
n =1
h =False
while b < a:
    b = (n*(n+1))/2
    n +=1
    if b == a:
        h =True

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

n=int(input())
i=1
sum=0
while sum<=n:
    if sum==n:
        print("YES")
        sum=0
        break
    sum+=i
    i+=1
if sum>0:
    print("NO")

# cook your dish here
n=int(input())
flag=0
for i in range(1,500):
    T=(i*(i+1))/2
    if T==n:

        print("YES")
        flag=1
        break

if flag==0:
    print("NO")

import math
a=int(input())
b=int(math.sqrt(1+(8*a)))
if b*b!=(1+(8*a)):
    print("NO")
else:
    print("YES")

n = int(input())
if n==1:
	print("YES")
else:
	flag = 0
	for i in range(1,n):
		if i*(i+1)//2==n:
			print("YES")
			flag = 1
			break
	if flag==0:
		print("NO")

n=int(input())
s=0
c=0
i=1
while(c<n):
    c=(i*(i+1))//2
    if(c==n):
        s=1
        break
    i+=1
if(s==1):
    print('YES')
else:
    print('NO')

x = int(input())
for i in range (x+1):
    if (i*(i+1))/2 == x :
        print("YES")
        exit()
print("NO")

import math
n = (8*int(input(""))+1)**0.5
if math.floor(n) == math.ceil(n):
    print("YES")
else:
    print("NO")

n = int(input())
flag = 0
for i in range(1, n + 1):
    if i * (i + 1) / 2 == n:
        flag = 1
        break

if (flag == 1):
    print("YES")
else:
    print("NO")

def isTriangular(num):
    if (num < 0):
        return False

    sum, n = 0, 1

    while (sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input())
if (isTriangular(n)):
    print("YES")
else:
    print("NO")

n = int(input())
f = 0
for i in range(500):
    if n == i*(i+1)/2:
        f = 1
        break
if f:
    print("YES")
else:
    print("NO")

n=int(input())
m=2*n
for i in range (2*n):
	if i*(i+1)==m:
		print("YES")
		break
else :
	print("NO")

n = int(input())
f =1
if n==1:print("YES")
else:

	for i in range(n):
		if i*(i+1) == 2*n:
			f =0
			break
	if f ==0:print("YES")
	else:print("NO")

def readln(): return tuple(map(int, input().split()))

print('YES' if readln()[0] in [n * (n + 1) // 2 for n in range(1, 50)] else 'NO')

import math

n = int(input())
i = 1
while n > 0:
    n -= i
    i += 1
print('YES' if n == 0 else 'NO')

hat = int(input())
lst = []
for i in range(0, hat+1):
    x = int((i*(i+1))/2)
    lst.append(x)
    if x >= hat:
        break
if hat in lst:
    print("YES")
else:
    print("NO")

n=input()
if n==1:
    print "YES"
else:
    for j in range(n):
        if j*(j+1)/2==n:
            print "YES"
            break
    else:
        print "NO"

T=input("")
t=int(T)
a=0
i=0
while(a<t):
    a=i*(i+1)/2
    i=i+1
if(t==0):
    print("NO")
elif(a==t):
    print("YES")
else:
    print("NO")

# -*- coding:utf-8 -*-
import math
n = int(raw_input().strip())
ac4=math.sqrt((1+(8*n)))
a=(-1.0+ac4)/2
b=(-1.0-ac4)/2
if b>a:
	a=b
if a%1.0==0:
	print"YES"
else:
	print"NO"

a=int(input())
n=1
while a>0:
    a-=n
    n+=1
if a==0:
    print('YES')
else:
    print('NO')

n = int(raw_input())

a = False
for i in range(500):
    tmp = i*(i-1)/2
    if tmp >= n:
        if tmp == n:
            a = True
        break

print a and 'YES' or 'NO'

n = input()
x = 1+8*n
y = int(x**0.5)
if y*y == x:
    print 'YES'
else:
    print 'NO'

import sys
import math

file = sys.stdin
num = int(file.readline().rstrip())
if num == 1:
	print "YES"
else:
	sqrt_v = int(math.sqrt(2*num))
	if sqrt_v*(sqrt_v + 1)/2 == num or (sqrt_v - 1)/2*sqrt_v == num:
		print "YES"
	else:
		print "NO"

def ni():
    return int(raw_input())

def seq_sum(n):
    return n * (n + 1) / 2

t = ni()

n = int(((8 * t + 1)**0.5 - 1) / 2)

print 'YES' if seq_sum(n) == t else 'NO'

n = input()

for i in xrange(500):
    if i * (i + 1) / 2 == n:
        print "YES"
        exit()
print "NO"

import sys
n = input()

for i in xrange(500):
    if i * (i + 1) / 2 == n:
        print "YES"
        sys.exit(0)
print "NO"

n=int(raw_input())
ok=False
for i in range(1,500):
    if (i*(i+1))/2==n:
        ok=True
if ok:
    print "YES"
else:
    print "NO"

print "YES" if input() in [x*(x+1)/2 for x in range(501)] else "NO"

print "YES" if input()*2 in [x*x+x for x in range(501)] else "NO"

print"YES"if input()*2in[x*x+x for x in range(501)]else"NO"

n=int(input())
if(n==1):
    print("YES")
t=0
if(n>1):
    for i in range(n):
        t=t+i
        if(t==n):
            print("YES")
            break
        else:
            continue
    else:
        print("NO")

n=int(input())
f=0
for i in range(1,n):
	if (i*(i+1))//2==n:
		f=1
		break
if f==1:
	print("YES")
else:
	print("NO")

T=input("")
t=int(T)
a=0
i=0
while(a<t):
    a=i*(i+1)/2
    i=i+1
if(a==t):
    print("yes")
elif(a==0):
    print("NO")
else:
    print("NO")

print("YES" if (int(input()))%2 != 0 else"NO")

n=int(input())
a=[1,3,6]
if n%9 in a and n==9*(n//9)+n%9:
	print("YES")
else:
	print("NO")

n=int(input())
if n==1 or n%3==0:
	print('YES')
else:
	print('NO')

import os

import sys

debug = True

if debug and os.path.exists("input.in"):
    input = open("input.in", "r").readline
else:
    debug = False
    input = sys.stdin.readline

def inp():
    return (int(input()))

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

def insr():
    s = input()
    return (list(s[:len(s) - 1]))

def invr():
    return (map(int, input().split()))

test_count = 1
if debug:
    test_count = inp()

for t in range(test_count):
    if debug:
        print("Test Case #", t + 1)
    # Start code here
    n = inp()
    ans = False
    for i in range(1, 25):
        if (i * (i + 1)) // 2 == n:
            ans = True
    print("YES" if ans else "NO")

import sys
import string

if __name__ == '__main__':

    num1 = map(int,sys.stdin.readline().split())

    temp = 0
    for i in range(35):

        if temp > 500 :
            print "NO"
            break
        elif num1 == temp :
            print "YES"
            break
        elif num1 < temp:
            print "NO"
            break
        else :
            temp +=i

# 47A
n = input()
for x in xrange(2, n):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

def isTri(num):

    if (num < 0):
        return False

    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input("Enter number "))
if (isTri(n)):
    print("YES")
else:
    print("NO")

n = int(input())
if n == 1 or n == 10:
    print('YES')
elif n == 12 or n == 9:
    print('NO')
elif n % 3 == 0:
    print('YES')
else:
    print('NO')

n=int(input())
# n(n+1)/2=tn
for i in range(n+1):
	if i*(i+1)//2==n:
		print("YES")
		break
print("NO")

n=int(input())
if(n==1 or n%3==0):
    print('YES')
else:
    print('NO')

from sys import stdin

t = int(stdin.readline())
rv = "NO"
for n in range(30):
  if n*(n+1)/2 == t:
    rv = "YES"
    break

print rv

def Tri(x):
	L = [];
	for i in range(1,35):
		L.extend([(i**2 + i)/2]);
	if x in L:
		print "NO";
	else:
		print "YES";

x = input();

Tri(x);

n = int(input())
f =1
if n==1:print("YES")
else:

	for i in range(int(n/2)):
		if i*(i+1) == 2*n:
			f =0
	if f ==0:print("YES")
	else:print("NO")

# Author: SaykaT
# Problem: 47A
# Time Created: July 21(Tuesday) 2020 || 04:24:31

#>-------------------------<#
from math import sqrt

# Helper Functions. -> Don't cluster your code.

# IO Functions. -> Input output
def io():
    n = int(input())
    return n

# Main functions. -> Write the main solution here
def solve():
    n = io()
    a = float(1)
    b = float(1)
    c = -float(n * 2)

    d = (b ** 2) - (4 * a * c)
    sol1 = (-b + sqrt(d)) / (2 * a)
    sol2 = (-b - sqrt(d)) / (2 * a)
    if n == 1:
        print('Yes')
    elif sol1 > 1:
        if float(int(sol1)**2) == ((sol1 ** 2)):
            print('Yes')
        else:
            print('No')
    elif sol2 > 1:
        if sol2 == ((sol2 ** 2) ** 0.5):
            print('Yes')
        else:
            print('No')
    else:
        print('No')

# Multiple test cases. -> When you have T test cases.
solve()

"""
this code is made for codeforces
"""
num1 = int(input())
a=0
flag1 = 1
while flag1 < num1:
    if (flag1*(flag1+1))/2 == num1:
        print("YES")
        a=1
    flag1 += 1
if a == 0:
    print("NO")

def isTriangular(num):

    if (num < 0):
        return False

    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n =int(input())
if (isTriangular(n)):
    print("The number is a triangular number")
else:
    print("The number is NOT a triangular number")

n = int(input())
for i in range(1, n):
    if (i * (i+1))//2 == n:
        print("YES")
        exit(0)
print("NO")

from math import sqrt
n = int(input())
x = 8*n + 1
if type(sqrt(x))==int:
    print"YES"
else : print "NO"

n=int(input())
if n%2!=0:
    print("YES")
else:
    print("NO")

triangular_number = int(input(""))

i=1
upperChars=0

while i<=triangular_number:
    triangular_number -=i
    print(triangular_number)
    i+=1

if (triangular_number==0):
    print("YES")
else:
    print("NO")

inp = int(input())
sum=0
if inp>0:
    string = "YES"
    for i in range(1,inp+1):
        sum = sum+i
        if(sum==inp):
            break
        else:
            string = "NO"
    print(string)
else:
    print("NO")

print("YES" if int(input())%2!=0 else "NO")

def isTriangular(num):

    if (num < 0):
        return False
    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input())
if (isTriangular(n)):
    print("YES")
else:
    print("No")

n = int(input())
if n%2 == 0:
    print('NO')
    exit(0)
print('YES')

a=int(input())
if a*3%2==0:
	print("NO")
else:
	print("YES")

#------------------------template--------------------------#
import os
import sys
from math import *
from collections import *
# from fractions import *
# from heapq import*
from bisect import *
from io import BytesIO, IOBase
def vsInput():
    sys.stdin = open('input.txt', 'r')
    sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        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
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
            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")
ALPHA='abcdefghijklmnopqrstuvwxyz'
M=10**9+7
EPS=1e-6
def Ceil(a,b): return a//b+int(a%b>0)
def value():return tuple(map(int,input().split()))
def array():return [int(i) for i in input().split()]
def Int():return int(input())
def Str():return input()
def arrayS():return [i for i in input().split()]

#-------------------------code---------------------------#
# vsInput()

n=Int()
if(n%3<=1): print("YES")
else: print("NO")

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("output2.out","w")
N=int(input())
ans=0
x=1
FLAG=0
while ans<N:
	ans=x*(x+1)
	if ans==2*N:
		print("YES")
		FLAG=1
		break
	x+=1
if FLAG==0:
	print("NO")

n=int(input())

if n%3==0 or n==1:
	print("YES")
else:
	print("NO")

a=int(input())
if a&1:
	print("YES")
else:
	print("NO")

n = int(input())
if n==1:
	print("YES")
else:
	if n%3!=0:
		print("NO")
	else:print("YES")

w=int(input())
if w>=1 and w<=500:
    if w==1:
        print("YES")
    elif w%3==0:
        print("YES")
    else:
        print("NO")

from math import *
k=int(input())
kk=sqrt(1+8*k)
a1=(-1+kk)/2
a2=(-1-kk)/2
b1=int(a1)
b2=int(a2)
if (a1==b1 or a2==b2) and (a1>0 or a2>0):
    print('Yes')
else:
    print('No')

#! /usr/bin/python

__author__="Guillermo Candia Huerta"
__date__ ="$07-12-2010 01:05:53 PM$"

def resolver(e):
    r = 0
    menos = 1
    while e > 0:
        e = e - menos
        menos = menos + 2
    if e == 0:
        return "YES"
    else:
        return "NO"

#    return r

if __name__ == "__main__":
    e = int(raw_input())
    r = resolver(e)
    print str(r)

n=int(input())
i=0
j=0
while n>j:
	j=(i*(i+1))/2
	i+=1
print('YES' if i==j else 'NO')

n=input()
for j in range(n):
    if j*(j+1)/2==n:
        print "YES"
else:
    print "NO"

# 47A
n = input()
for x in xrange(n + 1):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

import sys

n=int(input())
x=8*n+1
for i in range(50):
    if(i*i==x):
        print("YES")
        sys.exit()
print("NO")

n=int(input())
k=0
for i in range(1,n):
    if (i*(i+1))%2==0:
        if (i*(i+1))//2>n:
            k=1
            print("NO")
            break
        elif (i*(i+1))//2==n:
            k=1

            print("YES")
            break
if k==0:
    print("NO")

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("yes")
        exit()
print("no")

def isTri(num):

    if (num < 0):
        return False
    if (num == 0):
        return True

    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input("Enter number: "))
if (isTri(n)):
    print("YES")
else:
    print("NO")

n = int(input())
for i in range(1, n):
    if (i * (i+1))//2 == n:
        print("YES")
        exit(0)
print("NO")

a=int(input())
if a*3%2==0:
	print("NO")
else:
	print("YES")

from math import *
n=int(raw_input())
if 1<=n<=500:
  x=str((sqrt((8*n)+1)-1)/2)
  place=x.find('.')
  if x[place:]=='0' :
    print 'YES'
  else:
    print 'NO'

import math
list1 = [math.factorial(i) for i in range(500)]
print('YES' if int(input()) in list1 else 'NO')

# Author: SaykaT
# Problem: 47A
# Time Created: July 21(Tuesday) 2020 || 04:24:31

#>-------------------------<#
from math import sqrt

# Helper Functions. -> Don't cluster your code.

# IO Functions. -> Input output
def io():
    n = int(input())
    return n

# Main functions. -> Write the main solution here
def solve():
    n = io()
    a = float(1)
    b = float(1)
    c = -float(n * 2)

    d = (b ** 2) - (4 * a * c)
    sol1 = (-b + sqrt(d)) / (2 * a)
    sol2 = (-b - sqrt(d)) / (2 * a)
    if n == 1:
        print('Yes')
    elif sol1 > 1:
        if float(int(sol1)**2) == ((sol1 ** 2)):
            print('Yes')
        else:
            print('NO')
    elif sol2 > 1:
        if sol2 == ((sol2 ** 2) ** 0.5):
            print('Yes')
        else:
            print('NO')
    else:
        print('NO')

# Multiple test cases. -> When you have T test cases.
solve()

n=int(input())
if n==1 or n%3==0:
	print('YES')
else:
	print('NO')

x = int(input())
Check = False
for i in range (x+1):
    if (i*(i+1))/2 == x :
        Check = True
print("Yes" if Check == True else "NO")

import math
n=int(input())

a=(-1+math.sqrt(1+4*n))/2
b=(-1-math.sqrt(1+4*n))/2
if(a.is_integer()):
    print("NO")
elif(b.is_integer()):
    print("NO")
else:
    print("YES")

n=int(input())
if n==1 or n==3:
    print("YES")
else:
    for i in range(int(n/2)):
        if (i*(i+1))//2 ==n:
            print("YES")
        else:
            print("NO")

from math import *
n=int(raw_input())
x=str((sqrt((8*n)+1)-1)/2)
if x[2:]=='0':
    print 'YES'
else:
    print 'NO'

from math import*
n=int(input())

i=1
while i<=sqrt(n)+5:
    if(i*(i+1)==2*n):
        print("YES")
        exit()
    i+=1

print("NO")

print"YES"if input()in[x*x+x for x in range(501)]else"NO"

from math import sqrt
n = int(input())
x = 8*n + 1
if type(sqrt(x))!=int:
    print("YES")
else : print("NO")

n = int(input())
if n % 2 == 0:
    print('NO')
else:
    print('YES')

print("YES" if int(input())%2!=0 else "NO")

import math

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

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

    def process_task(self):
        x = (-1 + math.sqrt(1+4*self.n)) / 2
        if x.is_integer():
            self.result = "NO"
        else:
            self.result = "YES"

    def get_result(self):
        return self.result

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

x = int(raw_input('masukan data : '))
arr = []
for a in range(1,50):
	arr.append(a*(a + 1)/2)
hash = set(arr);

if x in hash:
	print "YES"
else:
	print "NO"

T=input("")
t=int(T)
a=0
i=0
while(a<t):
    a=i*(i+1)/2
    i=i+1
if(a==t):
    print("yes")
elif(t==0):
    print("NO")
else:
    print("NO")

from math import sqrt
n = int(input())
x = 8*n + 1
if type(sqrt(x))==int:
    print"YES"
else : print "NO"

n=int(input())
a=[1,3,6]
if n%9 in a and n==9*(n//9)+n%9:
	print("YES")
else:
	print("NO")

# 47A
n = input()
for x in xrange(n + 1):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

n = int(input())
if n == 1:
    print('YES')
elif n == 12:
    print('NO')
elif n % 3 == 0:
    print('YES')
else:
    print('NO')

# 47A
n = input()
for x in xrange(2, n):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

import math
n=int(input())
s=2*n
t=(math.sqrt)(1+4*s)-1
print (t)
if t%2==0:
    print ("YES")
else:
    print ("NO")

n = int(input())
flag = 0
for i in range(1, n):
    if (i * (i + 1)) // 2 == n:
        flag = 1
        print("YES")
        break
if flag == 0:
    print("NO")

w=int(input())
if w>=1 and w<=500:
    if w==1:
        print("YES")
    elif w%3==0:
        print("YES")
    else:
        print("NO")

# 47A
n = input()
for x in xrange(n):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("yes")
        exit()
print("no")

n=int(input())
s=1
a=1
for i in range(n):
    a+=1
    s+=a
    if s==n:
        print("YES")
    if s>n:
        break
else:
    print(-1)

import sys

n=int(input())
x=8*n+1
for i in range(50):
    if(i*i==x):
        print("YES")
        sys.exit()
print("NO")

n = int (input())
for i in range(1,n+1):
    if n ==i*(i+1)//2 :
        print("yes")
        exit()
print("no")

n = int(input())
S = set()
for i in range(1, 30):
    s = i*(i+1)//2
    S.add(s)
if n in S:
    print('YES')
else:
    print('NO')

n = int(input())
if n%2 == 0:
    print('NO')
    exit(0)
print('YES')

print("YES" if int(input())%2!=0 else "NO")

n=int(input())
if(n==1):
    print("YES")
t=0

for i in range(n):
    t=t+i
    if(t==n):
        print("YES")
        break
    else:
        continue
else:
    print("NO")

from math import *
n=int(raw_input())
x=str((sqrt((8*n)+1)-1)/2)
if x[2:]=='0':
    print 'YES'
else:
    print 'NO'

n=int(input())
sol="NO"
# n(n+1)/2=tn
for i in range(n+1):
	if i*(i+1)//2==n:
		a=("YES")
		break
print(sol)

x = set()
for i in range(1,501):
    x.add(i * (i+1)/2)

n = int(input())
if i in x:
    print('YES')
else:
    print('NO')

n = int(input())
if n == 1 or n == 10:
    print('YES')
elif n == 12:
    print('NO')
elif n % 3 == 0:
    print('YES')
else:
    print('NO')

# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="yaroslav"
__date__ ="$02.08.2011 18:00:13$"
import math
if __name__ == "__main__":
    x = int(raw_input())
    x1=x
    r = 2
    if x!=0:
        for i in range(2,1+int(math.sqrt(x1))):
            while x%i == 0:
                x = x/i
                r = r*i

        if x == r-1 or x == r+1:
            print 'YES'
        else:
            print 'NO'
    else:
        print 'NO'

import math

n = int(input())
i = 1
while n > 1:
    n -= i
    i += 1
print('YES' if n == 0 else 'NO')