#!/usr/bin/env python
import math

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

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

if ok: 
    print('pairwise coprime')
    exit()

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