Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number with it.

But I also don't want to use many numbers, so I'll choose three positive integers (they don't have to be distinct) which are not greater than *n*. Can you help me to find the maximum possible least common multiple of these three integers?
The first line contains an integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">6</sup>) — the *n* mentioned in the statement.
'''
def boy_girl():
    a=set(map(str,input()))
    if len(a)%2==0:print('CHAT WITH HER!')
    else:print('IGNORE HIM!')
boy_girl()

def perfect_permutation():
    a=int(input())
    if a%2!=0:print(-1)
    else:
        for i in range(a,0,-1):
            print(i,end=' ')
perfect_permutation()

def system_of_equation():
    count=0
    n,m=list(map(int,input().split()))
    for i in range(50):
        for j in range(50):
            if (i**2)+j == n and (j**2)+i == m:
                count+=1
    print(count)
system_of_equation()

def LLPS():
    a=input()
    maxx = max(a)
    c = a.count(maxx)
    print(maxx*c)
LLPS()

def soft_drinks():
    n,k,l,c,d,p,nl,np=input().split()
    milli = int(k)*int(l);toasts = milli//int(nl)
    limes = int(c)*int(d);salt = int(p)//int(np)
    minn = (min(toasts,limes,salt))//int(n)
    print(minn)
soft_drinks()

def Prison_break():
    a=int(input())
    for i in range(a):
        n=list(map(int,input().split()))
        print(n[0]*n[1])
Prison_break()

def Welcome():
    a=input();print(a)
Welcome()

def Abhilashs_Cat():
    prod = 1
    a=list(map(str,input()))
    b='0abcdefghijklmnopqrstuvwxyz'
    for i in a:
        prod *= (b.index(i))
    print(prod%((10**9)+7))
Abhilashs_Cat() 

def divisibility():
    a=int(input());print(a//2520)
divisibility()

def Abhilashs_Dogs():
    time=0
    count=0
    a=int(input())
    b=int(input())
    for i in range(b):
        c=int(input())
        time+=c
        if time>a:
            break
        count+=1
    print(count)       
Abhilashs_Dogs()

def singular_to_plural():
    t=int(input())
    for i in range(t):
        a=input()
        u=len(a)-1
        k=len(a)-2
        if (a[k] == 'h' and a[u] == 'c') or (a[u]=='x') or (a[u]=='s') or (a[u]=='o'):
            print(a+'es')
        elif (a[u]=='f') or (a[k]=='f' and a[u]=='e'):
            print(a[:-1]+'ves')
        elif (a[u]=='y'):
            print(a[:-1]+'ies')
        else:
            print(a+'s')
singular_to_plural()

def two_regular_polygons():
    a=int(input())
    for i in range(a):
        b=list(map(int,input().split()))
        if b[0]%b[1]==0:
            print('YES')
        else:
            print('NO')
two_regular_polygons()

def anti_light_cell_guessing():
    a=int(input())
    for i in range(a):
        b = list(map(int,input().split()))
        if b[0]==1 and b[1]==1:print(0)
        elif b[0]==1 or b[1]==1:print(1)
        else:print(2)
anti_light_cell_guessing()

def remove_duplicates():
    a=int(input())
    st=list(set(map(str,input().split())))
    print(len(st))
    for i in st:
        print(i,end=' ')
remove_duplicates()

def binary_decimal():
    a=int(input())
    for i in range(a):
        b=input()
        print(max(b))
binary_decimal()

def make_even():
    a=int(input())
    for i in range(a):
        t=input()
        c=0
        d=0
        if int(t)%2==0:
            print(0)
        elif int(t[::-1])%2==0:
            print(1)
        else:
            for i in t:
                if int(i)%2==0:
                    c+=1
            if c>=1:print(2)
            else:print(-1)
make_even()

def two_teams():
    a=int(input())
    for i in range(a):
        p,m=list(map(int,input().split()))
        total_members=p+m;total_teams=total_members//4
        minn = min((total_teams,min(p,m)))
        print(minn)
    #9, 3 = total=12, 12//4 = 3 min(3,3) = 3
    #7, 6 total = 13 13//4 = 3 min(3,6)=3
    #5, 5 = total=10 10//4 = 2 min(2,5) = 2
two_teams()

def Oseye_sort():
    num,x=input().split()
    n=int(num)
    if x=='a':
        for i in range(1,n+1):
            print(i,end=' ')
    else:
        for i in range(n,0,-1):
            print(i,end=' ')
Oseye_sort()

def pro_bonding():
    a,b=input().split()
    c=list(map(int,input().split()))
    maxx = max(c)
    if maxx > int(b):
        print('Difficult Loss')
    else:
        print('Easy Win!')
pro_bonding()

def happy_santa():
    a=input()
    c=0
    for i in a:
        if int(i)%2==0:
            c+=1
    if c>=1:print('SAD')
    else:print('HAPPY')
happy_sant

def a_plus_b():
    for i in range(int(input())):b=sum(list(map(int,input().split())));print(b)
a_plus_b()

def square():
    for i in range(int(input())):
        a=list(map(int,input().split()))
        b=list(map(int,input().split()))
        if min(a)+min(b) == max(a) and min(a)+min(b)==max(b):print('Yes')
        else:print('No')
square()

def euation():
    a=int(input());print(str(a*9)+' '+str(a*8))
equation()

def erasing_zeros():
    for i in range(int(input())):
        inp=input().strip('0');print(inp.count('0'))
erasing_zeros()

def is_your_horseshoe_on_the_roof():
    print(4-len(set(input().split())))
is_your_horseshoe_on_the_roof()

def hit_the_lottery():
    c=0
    a=int(input())
    while a>=100:
        a-=100
        c+=1
    while a>=20:
        a-=20
        c+=1
    while a>=10:
        a-=10
        c+=1
    while a>=5:
        a-=5
        c+=1
    while a>=1:
        a-=1
        c+=1
    print(c)
hit_the_lottery()
       
def odd_set():
    a=int(input())
    for i in range(a):
        c1=0;c2=0
        b=int(input())
        c=list(map(int,input().split()))
        for i in c:
            if i%2==0:c1+=1
            else:c2+=1
        if c1==c2:print('Yes')
        else:print('No')
odd_set()

def holiday_of_equality():
    a=int(input())
    b=list(map(int,input().split()))
    maxx=max(b)
    if len(b)==1:print(0)
    else:print(a*max(b)-sum(b))
holiday_of_equality()

def luntik_and_concerts():
    for i in range(int(input())):
        a,b,c=list(map(int,input().split()))
        a*=1;b*=2;c*=3
        if (a+b+c)%2==0:print(0)
        else:print(1)
luntik_and_concerts()

def hexagonal_numbers():
    a=int(input())
    print(2*(a**2)-a)
hexagonal_numbers()

import math
def distance():
    a=int(input());b=int(input());c=int(input());d=int(input())
    x = (c-a)**2 ; y=(d-b)**2
    print(math.sqrt(x+y))
distance()

def hello_coderams():
    a=input()
    print('Hello CodeRams')
hello_coderams()

def polygons():
    for i in range(int(input())):
        a=int(input())
        print((a-2)*180)
polygons()

def triple_product():
    a=int(input());b=int(input())
    print(3*a*b)
triple_product()

def fiz_buz():
    a=int(input())
    if a%3==0 and a%5==0:print('FizzBuzz')
    elif a%3==0:print('Fizz')
    elif a%5==0:print('Buzz')
fiz_buz()

def square_the_number():
    print((int(input()))**2)
square_the_number()

def points():
    a=int(input());b=int(input())
    print(a/b)
points()

def exponent():
    a=list(map(int,input().split()))
    print(a[0]**a[1])
exponent()

def ski_sum():
    print(sum(list(map(int,input().split()))))
ski_sum()

def triangular_sum():
    c=0
    for i in range(int(input())):
        a=int(input())
        c+=(a*3)
    print(c)
triangular_sum()

def labyrinth():
    t,u = input().split()
    c=0
    for i in range(int(t)):
        a=input()
        for j in a:
            if j == 'x':
                c+=1
    print(c)
labyrinth()

def resistors_in_parallel():
    a=int(input());b=int(input())
    print((a*b)/(a+b))
resistors_in_parallel()

def chem_lab():
    a,b=input().split()
    print(b,a)
chem_lab()

def gravity():
    a=input()
    if a=='EARTH':print(9.807)
    else:print(3.711)
gravity()

def machines():
    for i in range(int(input())):
        a,b=list(map(int,input().split()))
        print(a/b)
machines()

def boomilever():
    a,b=list(map(int,input().split()))
    c = list(map(int,input().split()))
    for i in range(len(c)):
        if c[i]==b:
            print(i+1)
boomilever()

def ping_pong_parachute():
    a=float(input())
    print((a**2)/(2*9.8))
ping_pong_parachute()

def missed_baseket_ball():
    a,b=input().split()
    c,d=list(map(int,input().split()))
    e,f=list(map(int,input().split()))
    g,h=list(map(int,input().split()))
    x =c+e ; y=d+f
    if x>y:print(a)
    else:print(b)
missed_baseket_ball()

def rules():
    print('Competition Rules:' +'\n'+str(input()))
rules()

def money_sum():
    c=0
    for i in range(int(input())):
        a=int(input())
        c+=a
    print(c)
money_sum()

def funny_numbers():
    a=int(input())
    if a%5 == 0 and a%7==0:print('YES')
    else:print('NO')
funny_numbers()

def gooooooool():
    c=0
    for i in (input()):
        if i=='o':c+=1
    print(c)
gooooooool()

def prison_break():
    c=1
    for i in range(int(input())):
        a,b=list(map(int,input().split()))
        c*=(b-a+1)
    print(c)
prison_break()

import math
def practice():
    a,b=list(map(int,input().split()))
    print((a*b)//math.gcd(a,b))
practice()

def speed_limits():
    c=[]
    for i in range(int(input())):
        a=tuple(input().split())
        c.append(a)
    d=dict(c)
    for j in range(int(input())):
        b = input()
        print(d.get(b))
speed_limits()

def distint_numbers():
    a=int(input());b=set(list(map(int,input().split())))
    print(len(b))
distint_numbers()

def free_throws():
    c=0;d=0
    for i in range(int(input())):
        a,b=list(map(int,input().split()))
        c+=a;d+=b
    an = (c/d)*100
    print(round(an,2))
free_throws()

def a_space():
    a=int(input())
    for i in range(2,a):
        if a%i==0:
            print(i);break
a_space1()

import math
def planet_omicron():
    a=int(input());b=int(input());c=int(input())
    g=a/b
    d = math.sqrt((2*c)/(g))
    print('It will take the object '+str(round(d,1))+' seconds to fall '+str(float(c))+' meters')
planet_omicron()

def broken_ladder():
    a,b=list(map(int,input().split()))
    c = list(map(int,input().split()))
    for i in range(2,len(c)):
        if abs(c[i+1]-c[i])<=b:print('YES');break
        else:print('NO');break
broken_ladder()

def passing_notes():
    print(input()[::-1])
passing_notes()

def its_me():
    print(input()+str(' Mario!'))
its_me()

def switch_case():
    print(input().swapcase())
switch_case()

def maximum_number():
    print(2**(int(input())-1)-1)
maximum_number()

def infinity_gaunlet():
    for i in range(int(input())):
        print(int(input())/2)
infinity_gaunlet()

def shopping_spree():
    for i in range(int(input())):
        a=list(map(int,input().split()))
        print(max(a))
shopping_spree()

def computer_love():
    c=[]
    a,b=list(map(int,input().split()))
    for i in range(1,b+1):
        if 2**i >= a and 2**i <=b:
            c.append(2**i)
    if len(c)==0:print(-1)
    else:print(max(c))
computer_love()

def comp_world():
    a=input()[:3]
    if int(a) <= 200:print('SMALL')
    elif int(a)<=500:print('MEDIUM')
    else:print('LARGE')
comp_world()

import math
def theorem():
    a,b=list(map(int,input().split()))
    x=b**2 - a**2
    print(math.sqrt(x))
theorem()

def find_divisible():
   for i in range(int(input())):
      a=list(map(int,input().split()))
      print(a[0],2*a[0])
find_divisible()

def the_model():
    a=int(input());b=int(input())
    print(a//b)
the_model()

def radioactivity():
    a,b=list(map(int,input().split()))
    print(b-a)
radioactivity()

def robots():
    a=input()
    for i in range(3):
        print(a)
robots()

def velocity():
    a,b,c=list(map(int,input().split()))
    print(((a*c)/b)**0.5)
velocity()

def gas_cost():
    a,b,c=list(map(float,input().split()))
    print((b/a)*c)
gas_cost()

def half_winds():
    a=input()
    if a=='ESE':print('east-southeast')
    elif a=='NNE':print('north-northeast')
    elif a=='ENE':print('east-northeast')
    elif a=='SSE':print('south-southeast')
    elif a=='SSW':print('south-southwest')
    elif a=='WSW':print('west-southwest')
    elif a=='WNW':print('west-northwest')
    elif a=='NNW':print('north-northwest')
half_winds()

def by_a_shovel():
    a,b=list(map(int,input().split()))
    for i in range(1,10):
        if ((a*i)-b)%10==0:print(i);break
        elif (a*i)%10==0:print(i);break
by_a_shovel()

def required_remainder():
    c=[]
    for i in range(int(input())):
        x,y,n=list(map(int,input().split()))
        for k in range(n):
            if k%x == y:
                c.append(k)
    print(max(c))
required_remainder()

def conscutive_sum_riddle():
    for i in range(int(input())):
        a=int(input())
        if a-1==0:print('0 '+str(a))
        else:
            print(-(a-1),a)
conscutive_sum_riddle()

def DMCA():
    a=int(input())
    print(((int(input())-1)%9)+1)
DMCA()

def is_it_rated():
    for i in range(10):print('NO')
is_it_rated()

def joe_is_on_TV():
    c=0
    for i in range(1,int(input())+1):
        c+=1/i
    print(c)
joe_is_on_TV()

def fundraising_the_game():
    d=0
    a,b=list(map(int,input().split()))
    for i in range(a):
        c=int(input())
        d+=c
    if d>b:print('Success')
    elif d==b:print('Just enough')
    else:print('More funding required')
fundraising_the_game()

def wrong_sub():
    a,b=list(map(int,input().split()))
    for i in range(b):
        if a%10==0:a//=10
        else:a-=1
    print(a)
wrong_sub()

def I_Wanna_be_guy():
    t=int(input())
    a=list(map(int,input().split()))
    b=list(map(int,input().split()))
    a.pop(0);b.pop(0)
    c = set(a+b)
    if len(c) == t:print('I become the guy.')
    else:print('Oh, my keyboard!')
I_Wanna_be_guy()

def hit_the_lottery():
    a=int(input())
    cn = 0
    b=100;c=20;d=10;e=5;f=1
    while a>0:
        if a>=b:a-=b;cn+=1
        elif a>=c:a-=c;cn+=1
        elif a>=d:a-=d;cn+=1
        elif a>=e:a-=e;cn+=1
        elif a>=f:a-=f;cn+=1
    print(cn)
hit_the_lottery()

def restoring_three_numbers():
    c=[]
    d=[]
    a=list(map(int,input().split()))
    maxx = max(a)
    a.remove(max(a))
    for i in range(len(a)):
        c.append(a[i])
        num = maxx-c[i]
        d.append(num)
    for j in range(len(d)):
        print(d[j],end=' ')
restoring_three_numbers()

def required_remainder():
    for i in range(int(input())):
        a=list(map(int,input().split()))
        print(a[0]*((a[2]-a[1])//a[0])+a[1])
required_remainder()

def choosing_teams():
    c=[]
    n,k = list(map(int,input().split()))
    a=list(map(int,input().split()))
    for i in range(len(a)):
        d=5-a[i]
        if d>=k:
            c.append(d)
    if len(c)>=3:print(len(c)//3)
    else:print(0)
choosing_teams()

import math
def lcm_problem():
    for i in range(int(input())):
        a,b=list(map(int,input().split()))
        if 2*a<=b:print(a,2*a)
        else:print(-1,-1)
lcm_problem()

def odd_divisor():
    for i in range(int(input())):
        num=int(input())
        while num%2==0:
            num=num/2
        if num==1:print('NO')
        else:print('YES')
odd_divisor()

def quantifiers():
    print(int(input())%2)
quantifiers()

def string_task():
    t=input().lower()
    a=list(t)
    vowels = ['a','e','i','o','u','y']
    s=[]
    for i in range(len(a)):
        if a[i] not in vowels:
            s.append(a[i])
    print('.'+'.'.join(s))
string_task()

def anton_and_letters():
    a=input()
    c=[]
    alpha = 'abcdefghijklmnopqrstuvwxyz'
    for i in range(len(a)):
        if a[i] in alpha:c.append(a[i])
    print(len(set(c)))
anton_and_letters()

def equidistant_letters():
    for i in range(int(input())):
        a=list(input())
        a.sort()
        print(''.join(a))
equidistant_letters()

def hexadecimals_theorem():
    print(int(input()),0,0)
hexadecimals_theorem()

def anton_and_polyhedron():
    c=0
    dict1 = {'Tetrahedron':4,'Cube':6,'Octahedron':8,'Dodecahedron':12,'Icosahedron':20}
    for i in range(int(input())):
        c+=dict1[input()]
    print(c)
anton_and_polyhedron()

def elections():
    for i in range(int(input())):
        a,b,c=list(map(int,input().split()))
        maxx = max(a,b,c)
        if a==b==c:
            print(1,1,1)
        elif a==maxx and a==b:
            print(1,1,a-c+1)
        elif a==maxx and a==c:
            print(1,a-b+1,1)
        elif b==maxx and b==c:
            print(b-a+1,1,1)
        elif maxx==a:
            print(0,maxx-b+1,maxx-c+1)
        elif maxx==b:
            print(maxx-a+1,0,maxx-c+1)
        elif maxx==c:
            print(maxx-a+1,maxx-b+1,0)
elections()

def bachgold_problem():
    a=int(input());c=[];s=''
    while a!=0:
        if a%2==0:c.append(2);a-=2
        else:c.append(3);a-=3
    for i in range(len(c)):s+=str(c[i])+' '
    print(str(len(c))+'\n'+s)
bachgold_problem()

def contest():
    a,b,c,d=list(map(int,input().split()))
    misha = max(((3*a)/10),(a-(a/250)*c))
    vasya = max(((3*b)/10),(b-(b/250)*d))
    maxx  = max(misha,vasya)
    if misha == vasya:print('Tie')
    elif maxx == misha:print('Misha')
    elif maxx == vasya:print('Vasya')
contest()

def new_year_and_hurry():
    a,b=list(map(int,input().split()))
    c = 240-b
    s=0
    for i in range(1,a+1):
        c-=(5*i)
        if c>=0:
            s+=1
    print(s)
new_year_and_hurry()

def spy_detected():
    for i in range(int(input())):
        a=int(input())
        b=list(map(int,input().split()))
        for i in range(len(b)):
            if b.count(b[i]) == 1:
                print(i+1)
                break
spy_detected()

def the_new_year_meeting_friend():
    a=list(map(int,input().split()))
    a.sort()
    print((a[1]-a[0])+(a[2]-a[1]))
the_new_year_meeting_friend()

def maximum_in_table():
    a=int(input())
    if a==1:print(1)
    elif a==2:print(2)
    elif a==3:print(6)
    elif a==4:print(20)
    elif a==5:print(70)
    elif a==6:print(252)
    elif a==7:print(924)
    elif a==8:print(3432)
    elif a==9:print(12870)
    elif a==10:print(48620)
maximum_in_table()

import sys
def little_elephant_and_bits():
    a=int(input())
    b=list(str(a))
    if len(set(b))==1:
        s=''
        b.remove('1')
        for i in range(len(b)):
            s+=b[i]
        print(s)
        sys.exit()
    else:
        for i in b:
            if i=='0':
                b.remove(i)
                break
        s=''
        for j in range(len(b)):
            s+=b[j]
        print(s)
little_elephant_and_bits()

def slueth():
    a=input().lower()
    v='aeiouy'
    a=a.replace(' ','')
    if a[-2] in v:print('YES')
    else:print('NO')
slueth()

def short_substrings():
    for i in range(int(input())):
        s=''
        a=list(input())
        for j in range(len(a)):
            if j%2==0:s+=a[j]
        print(s+a[len(a)-1])
short_substrings()

def copy_copy():
    for i in range(int(input())):
        a=int(input())
        b=list(map(int,input().split()))
        b.sort()
        print(len(set(b)))
copy_copy()

def mishka_and_games():
    mishka=0;chris=0
    for i in range(int(input())):
        a,b=list(map(int,input().split()))
        maxx = max(a,b)
        if a==b:pass
        elif maxx == a:mishka+=1
        elif maxx == b:chris+=1
    if mishka>chris:print('Mishka')
    elif chris==mishka:print('Friendship is magic!^^')
    else:print('Chris')
mishka_and_games()
    
def soldier_and_bananas():
    k,n,w=list(map(int,input().split()))
    c=0
    for i in range(1,w+1):
        c+=(k*i)
    if c>n:print(c-n)
    else:print(0)
soldier_and_bananas()

def dislike_of_threes():
    for i in range(int(input())):
        c=[]   
        a=int(input())
        for j in range(1,10000):
            if j%3!=0 and str(j)[-1]!='3':c.append(j)
        print(c[a-1])
dislike_of_threes()

def brains_photos():
    a,b=list(map(int,input().split()))
    c=''
    for i in range(a):
        c+=input()+' '
    if ('C' in c) or ('M' in c) or ('Y' in c):print('#Color')
    else:print('#Black&White')
brains_photos()

def accounting():
    a,b,n=list(map(int,input().split()))
    for i in range(-100,10000):
        if a*(i**n)==b:
            print(i)
            break
    print('No solution')
accounting()

def vus_the_cossack_and_a_contest():
    a,b,c=list(map(int,input().split()))
    if a<=b and a<=c:print('Yes')
    else:print('No')
vus_the_cossack_and_a_contest()

def journey_home():
    a=int(input())
    c=0
    while a>1:
        if a%2==0:
            a//=2
            c+=1
        else:
            a=(3*a)+1
            c+=1
    print(c)
journey_home()

def restore_the_permutation_by_merger():
    for i in range(int(input())):
        a=int(input())
        c=[]
        b=list(map(int,input().split()))
        for i in b:
            if i not in c:
                c.append(i)
        c=str(c)
        c=c.replace("[",'')
        c=c.replace("]",'')
        c=c.replace(",",'')
        print(c)
restore_the_permutation_by_merger()

def die_roll():
    a=max(list(map(int,input().split())))
    if a==1:print('1/1')
    if a==2:print('5/6')
    if a==3:print('2/3')
    if a==4:print('1/2')
    if a==5:print('1/3')
    if a==6:print('1/6')
die_roll()

def fashionablee():
    for i in range(int(input())):
        a=int(input()
        if a%4==0:print('YES')
        else:print('NO')
fashionablee()

a=int(input())
def pf(a):
    global primes
    global c
    primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]
    c=[]
    for i in primes:
        while a%i==0:
            c.append(i)
            a/=i
    return c
ps = pf(a)
c=c[::-1]
final=1
if set(c)=={2} and len(c)>=3:
    final*=(2**3)
    primes.remove(2)
    for k in range(len(c)-2):
        final*=primes[k]**(c[k]-1)
    print(final)
else:
    for j in range(len(c)):
        final*=primes[j]**(c[j]-1)
    print(final)

def amusing_jokes():
    a=input().lower()
    b=input().lower()
    c=input().lower()
    d=a+b
    if d.count('a')==c.count('a') and d.count('b')==c.count('b') and d.count('c')==c.count('c') and d.count('d')==c.count('d') and d.count('e')==c.count('e') and d.count('f')==c.count('f') and d.count('g')==c.count('g') and d.count('h')==c.count('h') and d.count('i')==c.count('i') and d.count('j')==c.count('j') and d.count('k')==c.count('k') and d.count('l')==c.count('l') and d.count('m')==c.count('m') and d.count('n')==c.count('n') and d.count('o')==c.count('o') and d.count('p')==c.count('p') and d.count('q')==c.count('q') and d.count('r')==c.count('r') and d.count('s')==c.count('s') and d.count('t')==c.count('t') and d.count('u')==c.count('u') and d.count('v')==c.count('v') and d.count('w')==c.count('w') and d.count('x')==c.count('x') and d.count('y')==c.count('y') and d.count('z')==c.count('z'):
        print('YES')
    else:print('NO')
amusing_jokes()

def suffix_three():
    for i in range(int(input())):
        a=input()
        if a[-2:] == 'po':print('FILIPINO')
        elif a[-4:] == 'masu':print('JAPANESE')
        elif a[-4:] == 'desu':print('JAPANESE')
        elif a[-5:] == 'mnida':print('KOREAN')
suffix_three()

def domino_disaster():
    for i in range(int(input())):
        a=int(input())
        b=input()
        for j in b:
            if j=='U':
                b=b.replace(j,'D')
            elif j=='D':
                b=b.replace(j,'U')
        print(b)
domino_disaster()

def valid_traingle():
    a,b,c=list(map(int,input().split()))
    if (a+b>c) and (b+c>a) and (a+c>b):print('VALID')
    else:print('INVALID')
valid_traingle()

def sorted_numbers():
    a=list(map(int,input().split()))
    if len(set(a))==a.sort(a):print('SORTED')
    else:print('UNSORTED')
sorted_numbers()

def abc():
    for i in range(int(input())):
        a=int(input())
        b=input()
        if b.count('1')>1 or b.count('0')>1:print('NO')
        else:print('YES')
abc()

def dawid_and_bags_of_candies():
    a,b,c,d=list(map(int,input().split()))
    if (a+b)==(c+d) or (a+c)==(b+d) or (a+d)==(b+c) or (a+b+c == d) or (a+b+d == c) or (b+c+d == a) or (a+c+d == b):print('YES')
    else:print('NO')
dawid_and_bags_of_candies()

def love_a():
    a=list(input())
    if len(a)-a.count('a')>=a.count('a'):print(2*a.count('a')-1)
    else:print(len(a))
love_a()

def first_problem():
    a,b=list(map(int,input().split()))
    print(round((a/b + 37),3))
first_problem()

def definite_game():
    a=int(input())
    if a<=2:print(a)
    else:print(1)
definite_game()

def life_without_zeros():
    a=input();b=input()
    if int(str(int(a)+int(b)).replace('0',''))==int(a.replace('0',''))+int(b.replace('0','')):print('YES')
    else:print('NO')
life_without_zeros()

def panoramixs_prediction():
    primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]
    a,b=map(int,input().split())
    if (a in primes) and (b in primes) and (primes.index(a)+1)==(primes.index(b)):
        print('YES')
    else:print('NO')
panoramixs_prediction()

def infinity_gaunlet():
    list1=['purple','green','blue','orange','red','yellow']
    dict1={'purple':'Power','green':'Time','blue':'Space','orange':'Soul','red':'Reality','yellow':'Mind'}
    for i in range(int(input())):
        a=input()
        if a in list1:
            list1.remove(a)
    print(len(list1))
    for j in range(len(list1)):
        print(dict1[list1[j]])
infinity_gaunlet()

def little_c_love_3i():
    a=int(input())
    if (a-2)%3==0:print(1,2,a-3)
    else:print(1,1,a-2)
little_c_love_3i()

def codebusters():
    for i in range(int(input())):
        a=list(input())
        c=''
        if len(a)%2==0:
            for j in range(0,len(a),2):
                a[j],a[j+1]=a[j+1],a[j]
            for k in range(len(a)):
                c+=a[k]
            print(c)
        else:
            for j in range(0,len(a)-1,2):
                a[j],a[j+1]=a[j+1],a[j]
            for k in range(len(a)):
                c+=a[k]
            print(c)
codebusters()

def game():
    a=int(input())
    if a%2==0:print(2)
    else:print(1)
game()

def mahmud_and_ahab_and_the_even_odd_game():
    a=int(input())
    if a%2==0:print('Mahmoud')
    else:print('Ehab')
mahmud_and_ahab_and_the_even_odd_game()

def fence():
    for i in range(int(input())):
        print(max(list(map(int,input().split()))))
fence()
       
def telephone_number():
    for i in range(int(input())):
        a=int(input())
        b=input()
        c=list(b)
        if len(b)>11:
            diff=len(b)-11
            d=c[0:diff+1]
            if '8' in d:print('YES')
            else:print('NO')
        else:
            if len(b)==11 and b[0]=='8':
                print('YES')
            else:print('NO')
telephone_number()

def divide_it():
    for i in range(int(input())):
        a=int(input());c=0
        while a>1:
            if a%2==0:a//=2;c+=1
            elif (2*a)%3==0:a=(2*a)//3;c+=1
            elif (4*a)%5==0:a=(4*a)//5;c+=1
            elif (a%2!=0) or (a%3!=0) or (a%5)!=0:
                print('-1')
                break
        else:print(c)
divide_it()

import math
def two_round_dances():
    a=int(input())
    print((math.factorial(a-1))//(a//2))
two_round_dances()

def distinct_digits():
    a,b=list(map(int,input().split()))
    for i in range(a,b+1):
        if len(set(str(i)))==len(str(i)):
            print(i)
            break
    else:print(-1)
distinct_digits()
'''
'''
#Important

d={'ali':1,'haseeb':2,'jalal':3}
lkeys=list(d.keys())
lvalues=list(d.values())
print(lvalues[lkeys.index('ali')])
print(lkeys[lvalues.index(1)])

'''
'''
def angry_students():
    for i in range(int(input())):
        a=int(input())
        b=input()
        c=0;d=[]
        if 'A' in b:
            inda=b.index('A')
            for j in range(inda,a):
                if b[j]=='P':
                    c+=1
                else:
                    d.append(c)
                    c=0
                if j==a-1:
                    d.append(c)
            print(max(d))
        else:print(0)
angry_students()

# Code for the changing in different basis
a=int(input())
c=[]
for i in range(2,a):
    copy = a
    s=''
    while copy>0:
        b=copy%i
        copy//=i
        s=str(b)+s
    c.append(s)
print(c)

def numbers():
    a=int(input())
    c=[]
    for i in range(2,a):
        copy = a
        s=''
        while copy>0:
            b=copy%i
            copy//=i
            s=str(b)+s
        d=0
        for j in range(len(s)):
            d+=int(s[j])
        c.append(d)
    print(str((sum(c)))+'/'+str((len(c))))
numbers()

def average_height():
    for i in range(int(input())):
        a=int(input())
        b=list(map(int,input().split()))
        even=[];odd=[]
        for j in range(len(b)):
            if b[j]%2==0:even.append(b[j])
            else:odd.append(b[j])
        final=''
        for k in even:
            final+=str(k)+' '
        for m in odd:
            final+=str(m)+' '
        print(final)
average_height()

def skier():
    for i in range(int(input())):
        a=input().lower()
        c=5
        if a=='wwee':print(12)
        else:
            for k in range(1,len(a)):
                if a[k]=='s' and a[k-1]=='n':
                    c+=1
                elif a[k]=='n' and a[k-1]=='s':
                    c+=1
                elif a[k]=='e' and a[k-1]=='w':
                    c+=1
                elif a[k]=='w' and a[k-1]=='e':
                    c+=1
                else:c+=5
            print(c)
skier()

def cherry():
    for i in range(int(input())):
        a=int(input());c=[]
        b=list(map(int,input().split()))
        for j in range(1,a):
            #print(b[j])
            #print(b[j-1])
            c.append(b[j]*b[j-1])
        print(max(c))
cherry()

def balanced_substring():
    for i in range(int(input())):
        a=int(input())
        b=input()
        if b.count('a')==0 or b.count('b')==0:print(-1,-1)
        else:
            for j in range(a):
                if b[j]!=b[j+1]:
                    print(j+1,j+2);break
balanced_substring()

def fafa_and_his_company():
    a=int(input())
    c=0
    for i in range(1,a):
        if a%i==0:
            c+=1
    print(c)
fafa_and_his_company()

def collecting_coins():
    for i in range(int(input())):
        a=list(map(int,input().split()))
        c=[]
        maxx=max(a[:-1])
        a.remove(maxx)
        for j in range(len(a)-1):
            c.append(maxx-a[j])
        n=a[-1]
        if n<sum(c):print('NO')
        elif (n-sum(c))%3!=0:print('NO')
        else:print('YES')
collecting_coins()

def two_arrays_and_swap():
    for i in range(int(input())):
        n,k=list(map(int,input().split()))
        a=list(map(int,input().split()))
        a.sort()
        b=list(map(int,input().split()))
        b.sort()
        c=b[::-1]
        for j in range(k):
            if a[j]<c[j]:
                a[j],c[j]=c[j],a[j]
        print(sum(a))
two_arrays_and_swap()
'''
import math
def lcm_challenge():
    a=int(input())
    if a>3:print(math.lcm(a,a-1,a-2))
    else:print(0)
lcm_challenge()
