#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t N;
  cin >> N;
  int mx = 0;
  vector<int> nums(N);
  for (int n = 0; n < N; ++n) {
    cin >> nums[n];
    mx = max(mx, nums[n]);
  }
  vector<int> mods(mx + 1);
  mods[1] = 1;
  for (int i = 2; i <= mx; ++i) {
    if (mods[i] != 0) {
      continue;
    }
    mods[i] = i;
    int tmp = i;
    while (tmp + i <= mx) {
      tmp += i;
      if (mods[tmp] != 0) continue;
      mods[tmp] = i;
    }
  }
  bitset<1000001> already;
  vector<int> cnts(mx + 1);
  bool pairwise = true;
  for (int n : nums) {
    bitset<1000001> cur;
    cur.set(n);
    ++cnts[n];
    while (n > 1) {
      int tmp = mods[n];
      while (n % tmp == 0) {
        n /= tmp;
      }
      if (pairwise && already.test(tmp)) {
        pairwise = false;
      }
      if (!cur.test(tmp)) {
        if (++cnts[tmp] == N) {
          cout << "not coprime" << endl;
          return 0;
        }
        cur.set(tmp);
      }
    }
    already |= cur;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
