# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
M = 10**6
def main(N, A):
    u = [False] * (M + 1)
    mx = 0
    for n in range(2, M + 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 == N:
            print('not coprime')
            return
        mx = max(mx, c)
    if mx <= 1:
        print('pairwise coprime')
    else:
        print('setwise coprime')

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