# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
from math import gcd
M = 10**6
def main(N, A):
    g = 0
    for a in A:
        g = gcd(g, a)
    if g > 1:
        print('not coprime')
        return

    u = [False] * (M + 1)
    for n in range(2, int(M**0.5) + 1):
        if u[n]: continue
        for nn in range(n, M + 1, n):
            u[nn] = True
        c = 0
        for a in A:
            if a % n == 0:
                c += 1
                if c >= 2:
                    print('setwise coprime')
                    return
    print('pairwise coprime')

if __name__ == '__main__':
    input = sys.stdin.readline
    N = int(input())
    *A, = map(int, input().split())
    main(N, A)
