#import sys
#input = sys.stdin.readline
from math import gcd
def eratosthenes(N):
    from collections import deque
    work = [True] * (N+1)
    work[0] = False
    work[1] = False
    ret = []
    for i in range(N+1):
        if work[i]:
            ret.append(i)
            for j in range(2* i, N+1, i):
                work[j] = False
    return ret

# def gcd(a, b):
#     while b != 0:
#         a, b = b, a % b
#     return a

def main():
    N = int( input())
    A = list( map( int, input().split()))
    # A.sort()
    g = A[0]
    for a in A:
        g = gcd(a, g)
    if g > 1:
        print("not coprime")
        return
    # for i in range(N-1):
    #     if A[i] == A[i+1]:
    #         print("setwise coprime")
    #         return
    E = eratosthenes(10**3)
    for e in E:
        cnt = 0
        for i in range(N):
            if A[i]%e == 0:
                cnt += 1
            while A[i]%e == 0:
                A[i] //= e
        if cnt > 1:
            print("setwise coprime")
            return
    A.sort()
    for i in range(N-1):
        if A[i] == A[i+1] and A[i] > 1:
            print("setwise coprime")
            return
    print("pairwise coprime")
    
    
if __name__ == '__main__':
    main()
