#include <bits/stdc++.h>
using namespace std;

#define max(a, b) ((a > b) ? a : b)
#define min(a, b) ((a < b) ? a : b)

#define forn(n) for(int i = 0; i < n; i++)
#define fork(k, n) for(int i = k; i < n; i++)

#define pb(n) push_back(n);

typedef long long ll;
typedef double dbl;

const int MX = 1e6;
const int MOD = 1e9 + 7;
const string ALPHA = "abcdefghijklmnopqrstuvwxyz";
const double PI = 3.1415926535;


int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);
	//Code here bby
  int n;
  cin>>n;
  vector<int> elems(n);
  while(n--){
    int elem;
    cin>>elem;
    elems.pb(elem);
  }
  sort(elems.begin(), elems.end());
  int set = elems[0];
  bool bad = 0;
  for(int idx = 1; idx < elems.size(); idx++){
    int temp = __gcd(elems[idx - 1], elems[idx]);
    if(temp == 1){
      bad = 1;
    }
    set = __gcd(set, temp);
  }
  if(bad){
    cout<<"pairwise coprime"<<endl;
    return 0;
  }
  if(set == 1){
    cout<<"setwise coprime"<<endl;
    return 0;
  }
  cout<<"not coprime"<<endl;
}
