#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int iNF = 0x3f3f3f3f;
const long long MAXN = 1000005;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int spf[MAXN];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < MAXN; i++) spf[i] = i;
  for (int i = 4; i < MAXN; i += 2) spf[i] = 2;
  for (int i = 3; i * i < MAXN; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
int main() {
  ;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  sieve();
  int n;
  cin >> n;
  vector<int> a(2);
  unordered_set<int> b;
  bool flag = false;
  int co = 1;
  for (int i = 0; i < n; i++) {
    int tmp = 0;
    if (i == 0) {
      cin >> a[i];
      tmp = a[i];
    } else if (i == 1) {
      cin >> tmp;
      co = gcd(tmp, a[0]);
    } else {
      cin >> tmp;
      co = gcd(co, tmp);
    }
    for (int j = 0; !flag && j < MAXN; j++) {
      if (tmp % spf[i] == 0) {
        if (!flag && b.count(spf[i]) == 0) {
          b.insert(spf[i]);
        } else {
          flag = true;
        }
      }
    }
  }
  if (!flag) {
    cout << "pairwise coprime" << '\n';
    return 0;
  };
  if (co == 1) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
  return 0;
}
