#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int dx4[4] = {0, 1, 0, -1};
const int dy4[4] = {-1, 0, 1, 0};
const int dx8[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
bool cmp(int X, int Y) { return X > Y; }
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long modpow(long long a, long long b, long long m = MOD) {
  a %= m;
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return res;
}
long long bpow(long long a, long long b) {
  if (b < 0) {
    return 0;
  }
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long modinv(long long a, long long m = MOD) { return modpow(a, m - 2, m); }
const int N = 200001;
vector<int> adj[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n + 1];
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long gcdall = 0;
  for (int i = 1; i <= n; i++) {
    gcdall = gcd(gcdall, a[i]);
  }
  long long gd[n + 1];
  gd[0] = 0;
  gd[n] = a[n];
  for (long long i = n - 1; i > 0; i--) {
    gd[i] = gcd(gd[i + 1], a[i]);
  }
  bool check = 1;
  for (long long i = 1; i < n; i++) {
    if (gd[i] != 1) {
      check = 0;
    }
  }
  if (check) {
    cout << "pairwise coprime";
  } else {
    if (gcdall == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
}
