# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

N=int(input())
A=tuple(map(int,input().split()))
MAX_A=max(A)

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

prime=primes(MAX_A)
ans='pairwise coprime'

is_coprime=True

for p in prime:
    cnt=0
    for i,x in enumerate(A):
        if x%p==0:
            cnt+=1
    if cnt>=2:
        ans='setwise coprime'
    if cnt==N:
        is_coprime=False

if is_coprime:
    print(ans)
else:
    print('not coprime')