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

N=int(input())

A=list(map(int,input().split()))
primes=[];
isprime=[1 for i in range(0,1001)];
s=[0 for i in range(0,1001)];
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();
pc=1
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 p in s:
      if s[p]:
        pc=0
      #s.add(p)
      s[p]=1
    if a>1000:
      if a in s2:
        pc=0
      s2.add(a)

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"))