
import math
import numpy
import functools
import operator

n=int(input())
a = list(map(int, input().split()))
pair_check=[]
ans1 = a[0]
for i in range(1, n):
    ans1 = ans1 * a[i] // math.gcd(ans1, a[i])
    #N個の最小公倍数

ans = a[0]
pair_check_check=0
for i in range(1, n):
    ans = math.gcd(ans, a[i])
    #N個の最大公約数

result = functools.reduce(operator.mul, a)

if result==ans1:
    print("pairwise coprime")

elif ans==1:
    print("setwise coprime")
    exit()
else:
    print("not coprime")