#include <bits/stdc++.h>
using namespace std;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
using vs = vector<string>;
using vvs = vector<vector<string>>;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  int N, cnt;
  bool flg = true;
  cin >> N;
  vl A(N);
  vl p(1000007);
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
    p[A[i]]++;
  }
  for (long long i = 2; i < N; i++) {
    long long cnt = 0;
    for (int j = i; j < 1000007; j += i) cnt += p[j];
    if (cnt > 1) {
      flg = false;
      break;
    }
  }
  if (flg) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  long long g = 0;
  for (long long i = 0; i < N; i++) g = gcd(g, A[i]);
  if (g == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
