#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")

using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
typedef long long ll;
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(int i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) (cout << (x) << endl)
#define pb push_back
#define mp make_pair
#define sz(x) int(x.size())
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
#define fs first
#define sc second
template<typename T> vector<T> make_vec(size_t n, T a) { return vector<T>(n, a); }
template<typename... Ts> auto make_vec(size_t n, Ts... ts) { return vector<decltype(make_vec(ts...))>(n, make_vec(ts...)); }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << ' '; return os; }
// 多倍長
#include <boost/rational.hpp>
#include <boost/multiprecision/cpp_int.hpp>
using boost::rational;
using boost::multiprecision::cpp_int;

const double PI = acos(-1);
const int INF = 1e9;
const ll LLINF = 1e16;
const ll MOD = 1e9+7;
template<class T> inline void add(T &a, T b){a = ((a+b) % MOD + MOD) % MOD;};

 

// 指定した文字cが文字列に何文字入ってるか
ll stringcount(string s, char c) {
    return count(s.cbegin(), s.cend(), c);
}


// 割り算の切り上げ処理
template<typename T>
T rp(T a, T b) {
  return (a + b - 1) / b;
}

// 桁和
template<typename T>
T digsum(T n) {
    T res = 0;
    while(n > 0) {
        res += n%10;
        n /= 10;
    }
    return res;
}

// 回文判定
bool kai (string s) {
    string t{s};
    reverse(begin(t), end(t));
    return s == t;
}

using pint = pair<int, int>;
using pll = pair<ll, ll>;


vector<string> split(const string &s, char delim) {
    vector<string> elems;
    string item;
    for (char ch: s) {
        if (ch == delim) {
            if (!item.empty())
                elems.push_back(item);
            item.clear();
        }
        else {
            item += ch;
        }
    }
    if (!item.empty())
        elems.push_back(item);
    return elems;
}



#define N 1010000
  
ll lpf[N], mobius[N]; 
  
// Function to calculate least 
// prime factor of each number 
void least_prime_factor() 
{ 
    for (int i = 2; i < N; i++) 
  
        // If it is a prime number 
        if (!lpf[i]) 
  
            for (int j = i; j < N; j += i) 
  
                // For all multiples which are not 
                // visited yet. 
                if (!lpf[j]) 
                    lpf[j] = i; 
} 
  
// Function to find the value of Mobius function 
// for all the numbers from 1 to n 
void Mobius() 
{ 
    for (int i = 1; i < N; i++) { 
  
        // If number is one 
        if (i == 1) 
            mobius[i] = 1; 
        else { 
  
            // If number has a squared prime factor 
            if (lpf[i / lpf[i]] == lpf[i]) 
                mobius[i] = 0; 
  
            // Multiply -1 with the previous number 
            else
                mobius[i] = -1 * mobius[i / lpf[i]]; 
        } 
    } 
} 
  
// Function to find the number of pairs 
// such that gcd equals to 1 
ll gcd_pairs(vector<ll> a, ll n) 
{ 
    // To store maximum number 
    ll maxi = 0;
  
    // To store frequency of each number 
    ll fre[N] = { 0 }; 
  
    // Find frequency and maximum number 
    for (int i = 0; i < n; i++) { 
        fre[a[i]]++; 
        maxi = max(a[i], maxi); 
    } 
  
    least_prime_factor(); 
    Mobius(); 
  
    // To store number of pairs with gcd equals to 1 
    ll ans = 0; 
  
    // Traverse through the all possible elements 
    for (int i = 1; i <= maxi; i++) { 
        if (!mobius[i]) 
            continue; 
  
        ll temp = 0; 
        for (int j = i; j <= maxi; j += i) 
            temp += fre[j]; 
  
        ans += temp * (temp - 1) / 2 * mobius[i]; 
    } 
  
    // Return the number of pairs 
    return ans; 
}

//二つの数の最大公約数
template<typename T>
T gcd(T a,T b){return b?gcd(b,a%b):a;}

//vector内の全ての数の最大公約数を求める、上記のgcdとセットで使う(関数内でgcdを呼んでる)
template<typename T>
T ngcd(vector<T> a){
    T res;
    res = a[0];
    for(int i = 1; i < a.size() && res != 1; i++) {
        res = gcd(a[i], res);
    }
    return res;
}

int main(void)
{
    cout.tie(0);
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    ll n;
    cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    ll ans = ngcd(a);
    ll tmp = (n * (n - 1)) / 2;
    if(gcd_pairs(a, n) == tmp) print("pairwise coprime");
    else if(ans == 1) print("setwise coprime");
    else print("not coprime");


}


Measured memory_bytes: 42560