#include <bits/stdc++.h>
using namespace std;
const long long maxi = 2 * 1e5 + 5;
long long mod = 1e9 + 7;
double pi = 3.141592653589793238;
long long power(long long x, long long n) {
  long long res = 1;
  x %= mod;
  while (n) {
    if (n & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}
long long sum_digits(long long n) {
  long long ret = 0;
  while (n) {
    ret += n % 10;
    n /= 10;
  }
  return ret;
}
long long gcd(long long a, long long b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long max_subarray(vector<int>& v) {
  if (v.empty()) return 0;
  long long glob = v[0], loc = v[0];
  for (int i = 1; i < v.size(); ++i) {
    loc = max(v[i] + 0LL, loc + v[i]);
    glob = max(loc, glob);
  }
  return glob;
}
long long num_digits(long long x) {
  long long ans = 0;
  while (x) {
    ++ans;
    x /= 10;
  }
  return ans == 0 ? 1 : ans;
}
vector<int> topological_sort(vector<vector<int>>& graph, int n,
                             vector<int>& indegree) {
  vector<int> ans;
  stack<int> s;
  for (int i = 0; i < n; ++i)
    if (indegree[i] == 0) s.push(i);
  while (!s.empty()) {
    int x = s.top();
    s.pop();
    ans.push_back(x);
    for (auto& adj : graph[x])
      if (--indegree[adj] == 0) s.push(adj);
  }
  return ans;
}
long long dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
long long p, q;
bool valid(long long i, long long j) {
  return i >= 1 && i <= p && j >= 1 && j <= q;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  long long gcd_all = v[0];
  for (int i = 1; i < n; ++i) {
    gcd_all = gcd(gcd_all, v[i]);
  }
  if (gcd_all > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  map<int, int> m;
  bool prm = true;
  for (int i = 0; i < n; ++i) {
    map<int, int> cur_m;
    int num = v[i];
    for (int j = 2; j * j <= num; ++j) {
      if (num % j == 0) {
        cur_m[j]++;
        cur_m[num / j]++;
      }
    }
    cur_m[num]++;
    for (auto& j : cur_m) {
      if (m[j.first] > 0) {
        prm = false;
        break;
      }
      m[j.first] += j.second;
    }
    if (!prm) break;
  }
  if (prm)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
  return 0;
}
