#include <bits/stdc++.h>
using namespace std;
#ifdef _DEBUG
  #include "_DEBUG.hpp"
#endif
#define int long long
const int INF = 1LL << 60;

signed main(){

  int n; cin >> n;
  vector<int> a(n);
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }

  int ans = -1;
  
  reverse(a.begin(), a.end());
  vector<int> dp(1e6+1, 0);
  for(int i = 0; i < n; i++){
    for(int j = 2; j*j <= a[i]; j++){
      if(a[i] % j == 0){
        if(dp[j] == 1) ans = 1;
        dp[j] = 1;
      }
    }
  }
  //cout << ans << endl;

  int res = a[0];
  for(int i = 0; i < n; i++){
    res = __gcd(res, a[i]);
  }

  if(ans == 1 && res == 1){
    cout << "setwise coprime" << endl;
  }else if(ans == -1){
    cout << "pairwise coprime" << endl;
  }else{
    cout << "not coprime" << endl;
  }

  return 0;
}