def main():
    N = int(input())
    *A, = map(int, input().split())

    B = [0] * (10 ** 6 + 1)
    for x in A:
        B[x] += 1

    setwise = False

    d = 2
    e = d
    cnt = 0
    while e <= 10 ** 6:
        if B[e]:
            cnt += 1
        e += d
    if cnt == N:
        print('not coprime')
        return
    elif cnt > 1:
        setwise = True

    d = 3
    while d <= 10 ** 6:
        e = d
        cnt = 0
        while e <= 10 ** 6:
            if B[e]:
                cnt += 1
            e += d
        if cnt == N:
            print('not coprime')
            return
        elif cnt > 1:
            setwise = True
        d += 2

    print('setwise coprime' if setwise else 'pairwise coprime')


if __name__ == '__main__':
    main()
