import math
from functools import reduce

a = "pairwise coprime"
b = "setwise coprime"
c = "not coprime"
n = int(input())
int_list = list(map(int,input().split()))
int_list.sort()

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
#print(lcm_list(int_list))

lcm = lcm_list(int_list)
multi = reduce(lambda x,y:x*y,int_list)

ans = int_list[0]
for i in range(1, n):
    ans = math.gcd(ans, int_list[i])

if lcm == multi:
    print(a)
elif ans == 1:
    print(b)
else:
    print(c)
