def main():
    import math
    n = int(input())
    a = sorted(list(map(int,input().split())))
    d = [-1 for i in range(a[-1])]
    d[0] = 1
    for i in range(2,a[-1]):
        for j in range(1,a[-1]//i+1):
            if d[i*j-1] == -1:
                d[i*j-1] = i
    Dic = [0 for i in range(a[-1])]
    flg = 0
    for i in range(n):
        if Dic[d[a[i]-1]] != 0:
            flg = 1
            break
        else:
            Dic[d[a[i]-1]] += 1
    g=a[0]
    for i in range(1,n):
        g = math.gcd(g,a[i])
    if g > 1:
        print('not coprime')
        return
    if flg == 1:
        print('setwise coprime')
        return
    print('pairwise coprime')

if __name__ == "__main__":
    main()
