#include <bits/stdc++.h>
using namespace std;
 
using ll = long long;
constexpr ll mod = 1e9 + 7;
#define endl '\n'
 
int main() {
  ios::sync_with_stdio(0); cin.tie(0);
 
  ll n;
  cin >> n;
  vector<ll> A(n);
  for (auto& _a : A) cin >> _a;
  bool is_pairwise = true;
  for (int i = 1; i < n; ++i) {
    if (gcd(A[i],A[i-1]) != 1) {
      is_pairwise = false;
      break;
    }
  }
    
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }


  ll g = A[0];
  for (auto x : A) g = gcd(g, x);
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  

}
