#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;
const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
vector<int> enum_div(int n) {
  vector<int> ret;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i != 1 && i * i != n) {
        ret.push_back(n / i);
      }
    }
  }
  return ret;
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < (ll)(n); i++) cin >> a[i];
  vector<vector<int>> vv(n);
  for (ll i = 0; i < (ll)(n); i++) {
    vv[i] = enum_div(a[i]);
  }
  vector<int> chk(100000, 0);
  for (ll i = 0; i < (ll)(n); i++) {
    chk[vv[i][1]]++;
  }
  int max = *max_element((chk).begin(), (chk).end());
  if (max == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    if (max == n)
      cout << "not coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  }
  return 0;
}
