def main():
    n = int(input())
    a = [int(v) for v in input().split()]
    amax = max(a)
    d = [0]*(amax+1)
    d[1] = 1
    for i in range(1, amax+1):
        if d[i]>0: continue
        j = i
        while j<=amax:
            if d[j]==0: d[j] = i
            j += i
    # print(d)

    pp = set()
    ps = set()
    pairwize = True
    setwize = False
    for i,v in enumerate(a):
        p = set()
        while v>1:
            p.add(d[v])
            v //= d[v]
        if i==0:
            pp = p
            ps = p
        else:
            if len(pp & p)>0:
                pairwize = False
            pp = pp | p
            ps = ps & p
    if len(ps)==0:
        setwize = True
    if pairwize:
        print('pairwize coprime')
    elif setwize:
        print('setwize coprime')
    else:
        print('not coprime')


main()