from math import factorial

def list_1():
    cnt = 0
    my_dict = {}
    my_list = list(map(int, input().split()))
    for i in my_list:
        if i not in my_dict.keys():
            my_dict.update({i:1})
        else:
            my_dict.update({i: my_dict.get(i) + 1})
    for i in my_dict.values():
        if i >= 3:
            cnt += int(factorial(i)/(2*factorial(i - 2)))
        elif i == 2:
            cnt += 1

    print(my_list)
    print(my_dict)
    print("counter:", cnt)

# list_1()


def list_2():
    """
    Заменил второй элемент списка на 17;
    Добавил числа 4, 5 и 6 в конец списка;
    Удалил первый элемент списка;
    Удвоил список;
    Вставил число 25 по индексу 3;
    Вывел список, с помощью функции print()
    """
    numbers = [8, 9, 10, 11]
    numbers[1] = 17
    numbers.extend([4, 5, 6])
    del numbers[0]
    numbers = 2*numbers
    numbers.insert(3, 25)
    print(numbers)

# list_2()

def list_3():
    l = list(map(int, input().split()))
    max_value = max(l)
    min_value = min(l)
    max_index = l.index(max_value)
    min_index = l.index(min_value)
    l[max_index] = min_value
    l[min_index] = max_value
    for i in l:
        print(i, end=' ')

# list_3()

def list_4():
    text = input().split()
    cnt = 0
    for word in text:
        if word.lower() in ["a", "an", "the"]:
            cnt += 1

    print("Общее количество артиклей:", cnt)    

# list_4()

def list_5():
    n_strings = int(input()[1:])
    index = 0
    new_string = ""
    for i in range(n_strings):
        string = input()
        if "#" in string:
            index = string.index("#")
            new_string = string[0:index]
            print(new_string.rstrip())
        else:
            print(string.rstrip())

# list_5()

def list_6():
    numbers = list(map(int, input().split()))
    numbers.sort()
    print(*numbers)
    numbers.sort(reverse=True)
    print(*numbers)

# list_6()
    
def list_7():
    keywords = ['False', 'True', 'None', 'and', 'with', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'try', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'while', 'yield']
    new_keywords = [i[1:] for i in keywords]
    lengths = [len(i) for i in keywords]
    # new_keywords = [i for i in keywords if len(i) >= 5]
    palindromes = [i for i in range(100, 1000) if i//100 == i%100%10]
    print(new_keywords)
    print(lengths)
    print(palindromes)

# list_7()
    
def list_8():
    n = int(input())
    numbers = [i**2 for i in range(1, n+1)]
    for i in numbers:
        print(i)

# list_8()
        
def list_9():
    numbers = list(map(int, input().split()))
    new_numbers = [i**3 for i in numbers]
    print(new_numbers)

# list_9()

def list_10():
    words = input().split()
    for i in words:
        print(i)

# list_10()
        
def list_11():
    data = [j for i in input().split() for j in i if j.isdigit()]
    print(''.join(data))

# list_11()
    
def list_12():
    data = list(map(int, input().split()))
    new_data = [i**2 for i in data if i%2 == 0 and (i**2)%10 != 4]
    print(*new_data)

# list_12()

def list_13():
    l1 = list(map(int, input().split()))
    l2 = list(map(int, input().split()))
    for i in range(len(l1)):
        print(l1[i] + l2[i], end = ' ')

# list_13()

def list_14():
    l1 = list(map(int, input().split()))
    l2 = []
    for i in l1:
        l2.append(i)
        l2.append('+')

    l2.pop()
    print(*l2, sep='', end='')
    print('=', sum(l1), sep='')

# list_14()

# abc-def-hijk или
# 7-abc-def-hijk

def list_15():
    l = list(input())
    flag = True
    if (l[3] == l[7] == '-') and len(l) == 12:
        for i in range(len(l)):
            if (l[i].isdigit() == False) and (l[i] != '-'):
                flag = False
    elif (l[1] == l[5] == l[9] == '-') and len(l) == 14:
        for i in range(len(l)):
            if (l[i].isdigit() == False) and (l[i] != '-'):
                flag = False
    else:
        flag = False

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

# list_15()


def list_16():
    l = list(input().split())
    length = [len(word) for word in l]
    print(max(length))

# list_16()
    
def list_17():
    l = list(input().split())
    l2 = []
    new_word = ''
    for word in l:
        new_word = word[1:] + word[0] + 'ки'
        l2.append(new_word)

    print(*l2)

# list_17()    

