#include<bits/stdc++.h>

#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 500005
#define all(x) x.begin(),x.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

using namespace std;

int32_t main(){
	IOS;
	int tt = 1; 
	//cin >> tt;
	while(tt--){
    int n; cin >> n;
    int A[n];
    map < int, int > mp;
    int g = 0;
    for(int i = 0; i < n; i++) {
      cin >> A[i];
      bool ok = true;
      for(int j = 2; j * j <= A[i]; j++){
        if(A[i] % j == 0){
          mp[j]++;
          ok = false;
        }
      }
      if(ok) mp[A[i]]++;
      g = __gcd(A[i], g);
    }
    bool flag = true;
    
    for(auto x : mp) {
      if(x.S > 1){
        flag = false;
        break;
      }
    }
    
    if(flag) {
      cout << "pairwise coprime" << endl;
      break;
    }
    
    if(g == 1) {
      cout << "setwise coprime" << endl;
      break;
    }
    
    cout << "not coprime";
	
	}
	return 0;
}
