n=int(input()) 
c=list(map(int, input().split()))
ans = 1
 
import math
from functools import reduce
import fractions
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
 
for i in range(1,n-1):
    f=fractions.gcd(c[i],c[i+1])
    t = fractions.gcd(c[i-1],c[i+1])
    ans = max(ans,max(f,t))
 
Ans = gcd_list(c)
 
if ans == 1:
    print('pairwise coprime')
if ans > Ans and Ans == 1:
    print('setwise coprime')
if Ans > 1:
    print('not coprime')