#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
vector<long long> enum_div(long long n) {
  vector<long long> ret;
  for (long long i = 2LL; i * i <= n; i++) {
    if (n % i == 0LL) {
      ret.push_back(i);
      if (i * i != n) {
        ret.push_back(n / i);
      }
    }
  }
  ret.push_back(n);
  sort(ret.begin(), ret.end());
  return ret;
}
long long check[1100000];
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long g = a[0];
  for (int i = 0; i < n; i++) g = GCD(g, a[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    vector<long long> v = enum_div(a[i]);
    long long m = v.size();
    for (int j = 0; j < m; j++) {
      if (check[v[j]] != 0) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      check[v[j]] = 1LL;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
