#include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
#define PI 3.141592653589793



int main(){
  int n; cin >> n; int a[n]; bool check[1010100] = {};
  int G = a[0];
  rep(i, n){
    cin >> a[i]; G = gcd(G, a[i]); check[a[i]]=true;
  }
  bool pa = true;
  for(int i=2; i<=1010000; i++){
    int cnt = 0;
    for(int j=i; j<=1010000; j+=i){
      if(check[j]) cnt++;
    }
    if(cnt>=2) pa = false;
  }
  if(pa) cout << "pairwise coprime" << endl;
  else if(G==1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
}