#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long gcd2(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long xx, yy;
  long long res = gcd2(b, a % b, xx, yy);
  x = yy;
  y = xx - yy * (a / b);
  return res;
}
int main() {
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<int> arr(n);
    for (auto &x : arr) cin >> x;
    vector<bitset<1005>> bs(n);
    for (int k = 0; k < n; k++) {
      int x = arr[k];
      for (int i = 2; i * i <= arr[k]; i++) {
        if (x % i != 0) continue;
        bs[k][i] = 1;
        while (x % i == 0) x /= i;
      }
      if (x != 1) bs[k][x] = 1;
    }
    vector<bitset<1005>> ors = bs;
    for (int i = n - 2; i >= 0; i--) ors[i] |= ors[i + 1];
    bool f = true;
    for (int i = 0; i < n - 1; i++) {
      if ((bs[i] & ors[i + 1]).any()) {
        f = false;
        break;
      }
    }
    if (f) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
    int g = arr[0];
    for (int i = 1; i < n; i++) g = gcd(g, arr[i]);
    if (g == 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    cout << "not coprime" << endl;
  }
  return 0;
}
