import math
def find_lcm(num1, num2): 
    if(num1>num2): 
        num = num1 
        den = num2 
    else: 
        num = num2 
        den = num1 
    rem = num % den 
    while(rem != 0): 
        num = den 
        den = rem 
        rem = num % den 
    gcd = den 
    lcm = ((num1 * num2)/gcd) 
    return lcm 
n=(int)(input());
l = []
l = [int(item) for item in input().split()]
num1 = l[0] 
num2 = l[1] 
lcm = find_lcm(num1, num2) 
pro = l[0]*l[1]; 
for i in range(2, len(l)): 
    lcm = find_lcm(lcm, l[i]) 
    pro = pro*l[i];
if (pro==lcm):
    print("pairwise coprime")
else:
    gc=math.gcd(l[0],l[1])
    for i in range(2, len(l)):
        gc=math.gcd(gc,l[i])
    if (gc==1):
        print("setwise coprime")
    else:
        print("not coprime")