#include <bits/stdc++.h>
using namespace std;
long long powMod(long long a, long long y) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (ans * a) % 1000000007;
    y = y >> 1;
    a = (a * a) % 1000000007;
  }
  return ans;
}
long long modInv(long long a) { return powMod(a, 1000000007 - 2); }
long long gcd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, f = 1;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  unsigned long long lcm = v[0];
  for (int i = 1; i < n; i++) {
    if (gcd(lcm, v[i]) != 1) {
      f = 0;
      break;
    }
    lcm = (lcm * (v[i]));
  }
  if (f == 0) {
    int g = v[0];
    for (int i = 1; i < n; i++) {
      g = gcd(g, v[i]);
    }
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  } else
    cout << "pairwise coprime" << endl;
  return 0;
}
