def main():
    import sys
    input = sys.stdin.buffer.readline
    from math import gcd
    N = int(input())
    A = list(map(int, input().split()))
    g = A[0]

    S = [1]*(N+1)
    for i, x in enumerate(A[::-1]):
        S[i+1] = S[i]*A[i]    
    flag = False

    if flag:
        print("pairwise coprime")
    elif g == 1:
        print("setwise coprime")

    else:
        print("not coprime")


main()