#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long mmod = 998244353;
vector<long long> dx = {1, -1, 0, 0};
vector<long long> dy = {0, 0, 1, -1};
vector<string> g;
vector<vector<bool>> used;
vector<long long> d;
long long gcd(const long long& a, const long long& b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
vector<long long> sieve(const long long& n) {
  vector<long long> v(n + 1);
  vector<bool> c(n + 1, 1);
  vector<long long> ret;
  for (long long i = 2; i <= n; ++i) {
    if (c[i]) {
      for (long long j = 2 * i; j <= n; j += i) {
        c[j] = 0;
      }
      ret.push_back(i);
    }
  }
  return ret;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long gc = -1;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (gc < 0) {
      gc = a[i];
      continue;
    }
    gc = gcd(a[i], gc);
  }
  vector<long long> c(1e6 + 1);
  vector<long long> p = sieve(1e6);
  vector<vector<long long>> div(1e6 + 1, vector<long long>(1, 1));
  for (int i = 0; i <= p.size(); ++i) {
    for (int j = p[i]; j <= 1e6; j += i) {
      div[j].push_back(p[i]);
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < p.size(); ++j) {
      c[div[a[i]][j]]++;
    }
  }
  bool f = 0;
  for (int i = 2; i <= 1e6; ++i) {
    if (c[i] > 1) {
      f = 1;
      break;
    }
  }
  if (!f) {
    cout << "pairwise coprime" << endl;
  } else {
    if (gc == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
