#!/usr/bin/env python
import math

n = int(input())
a = list(map(int, input().split()))
m = max(a)
fre = [0 for _ in range(m+1)]

for i in range(n):
    fre[a[i]] += 1

# pairwise coprime
pairwise = True
for i in range(2, len(fre)):
    cnt = 0 
    for j in range(i, m+1, i): 
        cnt += fre[j]
    if cnt > 1:
        pairwise = False
if pairwise:
    print('pairwise coprime')
    exit()

# setwise coprime
ans = math.gcd(a[0],a[1])
for i in range(2, n): 
   ans = math.gcd(ans, a[i])
if ans == 1:
    print('setwise coprime')
    exit()

print('not coprime')
