import math
_ = input()
A = list(map(int, input().split()))

a = [A[0]]
for i, _b in enumerate(A[1:], 1):
    for _a in a:
        _gcd = math.gcd(_a, _b)
        if _gcd != 1:
            c = _gcd
            for _c in A[i:]:
                c = math.gcd(c, _c)
                if c == 1:
                    print('setwise coprime')
                    break
            else:
                print('not coprime')
            break
    else:
        a.append(_b)
        continue
    break
else:
    print('pairwise coprime')
