#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long a, b, c, d, m, n, maxi = 0, f = 0, mini = LLONG_MAX, sum = 0;
  string str;
  cin >> n;
  vector<long long> v(n);
  for (long long i = (long long)(0); i < (long long)(n); i++) cin >> v[i];
  map<long long, long long> mp;
  set<long long> s;
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    vector<long long> tmp = divisor(v[i]);
    for (long long i = (long long)(0); i < (long long)(tmp.size()); i++) {
      mp[tmp[i]]++;
      s.insert(tmp[i]);
    }
  }
  for (auto itr = s.begin(); itr != s.end(); ++itr) {
    if (*itr == 1) continue;
    maxi = max(mp[*itr], maxi);
  }
  if (maxi == n)
    cout << "not coprime" << endl;
  else if (maxi == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
