#https://note.nkmk.me/python-gcd-lcm/
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n = int(input())
a = list(map(int,input().split()))

isPairwiseCoprime = True
for i in range(n-1):
    for j in range(i+1,n):
        if math.gcd(a[i],a[j])!=1:
            isPairwiseCoprime = False
            break
    else:
        continue
    break

if isPairwiseCoprime:
    print('pairwise coprime')
else:
    if gcd_list(a)==1:
        print('setwise coprime')
    else:
        print('not coprime')