from math import gcd
from collections import deque
mod = 10**9 + 7

def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
    
n = int(input())
li = deque(map(int, input().split()))

if gcdlist(li) != 1:
    print("not coprime")
    exit()

SUM = 1
for i in range(n):
    SUM *= li[i]
    SUM %= mod
    
for i in range(n):
    s = li.popleft()
    SUM //= s
    GCD = gcd(s, SUM)
    if GCD != 1:
        print("setwise coprime")
        exit()
    SUM *= s
else:
    print("pairwise coprime")