#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int inf = LONG_LONG_MAX;
long long int dx4[4] = {1, 0, -1, 0};
long long int dy4[4] = {0, -1, 0, 1};
long long int dx8[8] = {1, 0, -1, 1, -1, 1, 0, -1};
long long int dy8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
vector<long long int> bunkai(long long int a) {
  if (a <= 0) return {};
  if (a == 1) return {{1, 1}};
  vector<long long int> f;
  long long int b = a;
  for (long long int i = 2; i * i <= a; i++) {
    if (b % i == 0) {
      f.push_back(i);
      b = b / i;
      i--;
    }
    if (b == 1) break;
  }
  if (b != 1) f.push_back(b);
  return f;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  vector<vector<long long int>> F(1000001, {-1});
  vector<long long int> s(1000001);
  for (long long int i = 0; i < n; i++) {
    vector<long long int> f;
    if (F[a[i]][0] != -1) {
      vector<long long int> v = F[a[i]];
      f = v;
    } else {
      vector<long long int> v = bunkai(a[i]);
      F[a[i]] = v;
      f = v;
    }
    vector<vector<long long int>> u;
    long long int p = f[0];
    long long int c = 1;
    for (long long int i = 1; i < f.size(); i++) {
      if (f[i] == p)
        c++;
      else {
        u.push_back({p, c});
        p = f[i];
        c = 1;
      }
    }
    u.push_back({p, c});
    for (long long int j = 0; j < u.size(); j++) {
      s[u[j][0]]++;
    }
  }
  long long int m = 0;
  for (long long int i = 2; i < 1000001; i++) m = max(m, s[i]);
  if (m == 1)
    cout << "pairwise coprime" << endl;
  else if (m < n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
