#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(long long a, 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);
  const int N = 1e6 + 5;
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  long long lcm = v[0], p = v[0];
  for (int i = 1; i < n; i++) {
    lcm = ((lcm % 1000000007 * (v[i] % 1000000007)) % 1000000007 *
           modInv(gcd(lcm, (long long)v[i]))) %
          1000000007;
    p = (p % 1000000007 * v[i] % 1000000007) % 1000000007;
  }
  if (lcm != p) {
    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;
}
