from math import gcd
from collections import defaultdict
def main():
    n = int(input())
    a = list(map(int,input().split()))
    dic = defaultdict(bool)
    pairW = True
    setW = a[0]
    for i in a:
        t = 1
        while t**2 <= i:
            if i % t == 0:
                if (t != 1 and dic[t]) or dic[i//t]:
                    pairW = False
                    break
                else:
                    dic[t] = True
                    dic[i//t] = True
            t += 1
        setW = gcd(setW,i)
    

    if pairW:
        print("pairwise coprime")
        return
    elif setW == 1:
        print("setwise coprime")
        return
    else:
        print("not coprime")


if __name__ == "__main__":
    main()