#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
using vec = vector<int>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const double pi = acos(-1);
struct pf {
  vector<long long> res;
  pf(long long N) {
    for (long long a = 2; a * a <= N; ++a) {
      if (N % a != 0) continue;
      if (N % a == 0) res.push_back(a);
    }
    if (N != 1) res.push_back(N);
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ll n;
  cin >> n;
  vll a(n);
  ll f[1000005];
  for (int i = 0; i < (int)(n); i++) {
    int a;
    cin >> a;
    f[a]++;
  }
  int judge = 1;
  for (int i = (2); i <= (int)(1000000); i++) {
    int tmp = 1;
    for (int j = (1); j <= (int)(1000000); j++) {
      if (i * j > 1000000) break;
      tmp += f[i * j];
    }
    chmax(judge, tmp);
  }
  if (judge == 1)
    cout << "pairwise coprime" << endl;
  else if (judge == n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
