def main():
    n = int(input())
    a = sorted(list(map(int,input().split())))
    d = [1 for i in range(a[-1])]
    for i in range(2,a[-1]+1):
        if d[i-1] == 1:
            for j in range(1,a[-1]//i+1):
                if d[i*j-1] == 1:
                    d[i*j-1] = i
    prm = [0 for i in range(a[-1])]
    for i in range(n):
        p = []
        while a[i] != 1:
            p.append(d[a[i]-1])
            a[i] = a[i] // d[a[i]-1]
        p = set(p)
        for p_ in p:
            prm[p_-1] += 1
    flg = 0
    for i in range(1,len(prm)):
        if prm[i] == n:
            print('not coprime')
            return
        if prm[i]>1:
            flg = 1
    if flg==1:
        print('setwise coprime')
        return
    print('pairwise coprime')

if __name__ == "__main__":
    main()
