def gcd(a,b):
    if a < b:
        a,b = b,a
    a = a%b
    return gcd(b,a) if a!= 0 else b

def main():
    n = int(input())
    A = list(map(int,input().split()))

    last_a = A[0]
    pairwise = True
    setwise = gcd(A[0],A[1])
    for a in A[1:]:
        if pairwise and gcd(last_a,a) == 1:
            last_a = a
        else:
            pairwise = False

        setwise = gcd(setwise,a)
    if pairwise:
        print("pairwise coprime")
    elif setwise == 1:
        print("setwise coprime")      
    else:
        print("not coprime")
    return

if __name__ == "__main__":
    main()