from math import gcd


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

pw_ok = True
pw = a[0]
sw = a[0]
for i in a[1:]:
    sw = gcd(sw, i)
    if not pw_ok and sw == 1: break
    g = gcd(pw, i)
    if g != 1:
        pw_ok = False
    pw = pw*i//g # pw = lcm(pw, i)

if pw_ok:
    print('pairwise coprime')
elif sw == 1:
    print('setwise coprime')
else:
    print('not coprime')

