n=int(input())
A=list(map(int,input().split()))
from collections import deque
queue=deque(A)
from math import gcd
import sys
while len(queue)>2:
    a=queue.popleft()
    b=queue.popleft()
    c=gcd(a,b)
    if c==1:
        break
    queue.append(c)
else:
    a=queue.popleft()
    b=queue.popleft()
    c=gcd(a,b)
    if c!=1:
        print('not coprime')
        sys.exit()
queue=deque(A)
while len(queue)>2:
    a=queue.popleft()
    b=queue.popleft()
    if gcd(a,b)!=1:
        print('setwise coprime')
        sys.exit()
    else:
        c=a*b
        queue.append(c)  
a=queue.popleft() 
b=queue.popleft()
if gcd(a,b)==1:
    print('pairwise coprime') 
else:
    print('setwise coprime')            