import sys
sys.setrecursionlimit(10**6)


def main(input, print):
    N = int(input())
    A = list(map(int, input().split()))
    A = sorted(A)
    m = A[0]
    table = [0] * (m+1)
    for i in range(2, m+1):
        for j in range(N):
            if A[j] % i == 0:
                table[i] += 1
        if table[i] == N:
            print('not coprime')
            return
        if table[i] > 1:
            print('setwise coprime')
            return
    print('pairwise coprime')


if __name__ == '__main__':
    main(sys.stdin.readline, print)
