from math import gcd, sqrt

def Divisor_Set(n):
    s = set()
    for i in range(1, int(sqrt(n))+2):
        if n%i == 0:
            s.add(i)
            s.add(n//i)
    return s

def main():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = [0]*(10**6+1)
    for v in a:
        st = Divisor_Set(v)
        st.remove(1)
        for el in st:
            cnt[el] += 1
    f = True
    for i in range(10**6 + 1):
        if cnt[i] > 1:
            f = False
            break
    if f:
        print("pairwise coprime")
    else:
        all_gcd = a[0]
        for i in range(1, n):
            all_gcd = gcd(all_gcd, a[i])
        if all_gcd == 1:
            print("setwise coprime")
        else:
            print("not coprime")

if __name__ == "__main__":
    main()