def gcd(x,y):
  return y if x%y==0 else gcd(y,x%y)

N=int(input())
A=list(map(int,input().split()))


primes=[];
isprime=[1 for i in range(0,1001)];
isprime[1]=0;isprime[0]=0
for i in range(2,1001):
  if isprime[i]:
    primes.append(i)
    j=2;
    while i*j<=1000:
      isprime[i*j]=0;
      j+=1
#s=set();
A.sort();


pc=1

l=A[0]
for i in range(1,N):
  if l==A[i]:
    pc=0
  l=A[i];

#s=[0 for i in range(0,1001)];
s=[0 for i in range(0,1001)]
#s2=set();
for i in range(N):
  a=A[i];
  
  for p in primes:
    #if a==1:
    #  break
    if(a%p==0):
      #while(a%p==0):
      #  a//=p;
      if s[p]:
        pc=0
      s[p]=1
    #if a>=1000:
    #if a!=1:
      #if a in s2:
      #if s[a]:
      #  pc=0
      #s2.add(a)
      #s[a]=1


g=A[0];
for i in range(1,N):
  g=gcd(g,A[i])
print("pairwise coprime"if pc else("setwise coprime"if g==1 else "not coprime"))