#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

#define int long long
#define endl "\n"

constexpr long long INF = (long long)1e18;
constexpr long long MOD = 1'000'000'007; 

struct fast_io {
	fast_io(){
		std::cin.tie(nullptr);
		std::ios::sync_with_stdio(false);
	};
} fio;

signed main(){
	cout<<fixed<<setprecision(10);
	
    const int MAX = 1'000'100;
    int N;
	vector<int> table;
	vector<int> x;
	vector<int> A;
    bool flag = false;
    int GCD = 0;
    
    cin>>N;
    
    table.resize(MAX);
    x.resize(MAX);
    A.resize(N);
    
    table[1] = table[0] = 1;
    
    for(int i = 1; i < table.size(); i++){
        
        if(table[i]) continue;
        
        table[i] = 1;
        
        for(int j = i * 2; j < table.size(); j += i){
            table[j] = j/i;
        }
    }
    // for(int i = 0; i < table.size(); i++){
        // cout<<i<<" table "<<table[i]<<endl; 
    // }
    
    for(int i = 0; i < N; i++){
        cin>>A[i];
        
        GCD = __gcd(GCD, A[i]);
    }
    
    for(int i = 0; i < N; i++){
        int a = A[i];
        vector<int> hoge;
        
        // cout<<"A = "<<a<<endl; cout<<"i = "<<i<<endl;
        
        for(;;){
            if(a == 1) break;
            if(a == 0) break;
            if(a/table[a] == 1) break;
            
            // cout<<"[] "<<a/table[a]<<endl;
            
            if(x[a - table[a]]) {
                flag = true;
                // cout<<"Flag"<<" "<<a - table[a]<<" "<<x[a - table[a]]<<endl;
            }
            // cout<<"a = "<<a<<" "<<table[a]<<endl;
            // cout<<a - table[a]<<endl;
            // x[a - table[a]]++;
            
            hoge.push_back(a/table[a]);
            
            // cout<<"X = "<<x[a - table[a]]<<" <> "<<a - table[a]<<endl;
            a = table[a];
        }
        
        for(int j = 0; j < hoge.size(); j++){
            x[hoge[j]]++;
        }
        
        if(flag) break;
    }
    
    // cout<<"GCD = "<<GCD<<endl;
    
    if(flag == true && GCD == 1) cout<<"setwise coprime"<<endl;
    else if(flag == false)cout<<"pairwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
	
	return 0;
}