#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
constexpr ll INF = 1e18;
int gcd(int a,int b){return b?gcd(b,a%b):a;}

vector<ll> prime;
bool is_prime[ll(1e3) + 1]; // is_prime[i]がtrueならiは素数
int sieve(int n) {
    int p = 0;
    for (int i = 0; i <= n; i++) is_prime[i] = true;
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i <= n; i++) {
        if (is_prime[i]) {
            prime.push_back(i);
            for (int j = 2 * i; j <= n; j += i) is_prime[j] = false;
        }
    }
    return p;
}

int main(void) {
    ll N;
    cin >> N;
    vector<ll> A(N);
    for (int i = 0; i < N; i++) {
        cin >> A[i];
    }

    prime = vector<ll>();
    sieve(1e3);
    vector<ll> prime_count(prime.size());
    for (ll i = 0; i < N; i++) {
        for (size_t j = 0; j < prime.size(); j++) {
            if (A[i]%prime[j] == 0) {
                prime_count[j]++;
                while (A[i]%prime[j] == 0) {
                    A[i] /= prime[j];
                }
            }
        }
    }
    bool sc = false;
    bool nc = false;
    for (size_t i = 0; i < prime_count.size(); i++) {
        // cout << prime_count[i] << endl;
        if (prime_count[i] == N) nc = true;
        else if (prime_count[i] > 1) sc = true;
    }
    if (nc) {
        cout << "not coprime" << endl;
    } else if(sc) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "pairwise coprime" << endl;
    }
    return 0;
}

