#include <iostream>
#include <array>
#include <vector>
#include <utility>
#include <limits>

constexpr int MAX_A = 1'000'000;
std::array<int, MAX_A + 1> minPrime;

int main(void){
    std::fill(minPrime.begin(), minPrime.end(), std::numeric_limits<int>::max());
    minPrime[0] = 1; minPrime[1] = 1;
    for(int p = 2; p <= MAX_A; ++p) if(minPrime[p] == std::numeric_limits<int>::max()){
        minPrime[p] = p; for(int q = 2 * p; q <= MAX_A; q += p) if(minPrime[q] == std::numeric_limits<int>::max()) minPrime[q] = p;
    }
  
    std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); 
    int n; std::cin >> n;
    std::vector<int> A(n); for(auto& itr : A) std::cin >> itr;
  
    // all GCD 
    for(int p = 2; p <= MAX_A and p <= A[0]; ++p) if(minPrime[p] == p and A[0] % p == 0){
        bool dividable = true;
        for(int j = 1; j < n; ++j) if(A[j] % p != 0){ dividable = false; break; }
        if(dividable){ std::cout << "not coprime\n"; return 0; }
    }
    std::array<bool, MAX_A + 1> Found; std::fill(Found.begin(), Found.end(), false);
    for(int i = 0; i < n; ++i){
        int a = A[i]; 
        while(a > 1){
            if(Found[minPrime[a]]){ std::cout << "pairwise coprime\n"; return 0; }
             a /= minPrime[a];
        }
        a = A[i]; while(a > 1){ Found[minPrime[a]] = true; a /= minPrime[a]; }
    }
    std::cout << "pairwise coprime\n";
    return 0;
}
