#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
struct Eratos {
  vector<bool> is_prime;
  vector<int> P;
  Eratos(int N) : is_prime(N + 1, true) {
    for (int i = 2; i <= N; i++) {
      if (is_prime[i]) {
        for (int j = 2 * i; j <= N; j += i) is_prime[j] = false;
        P.push_back(i);
      }
    }
  };
};
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  Eratos er(1000002);
  vector<int> s(1000002, 0);
  int judge1 = 1;
  int judge2 = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; er.P[j] * er.P[j] < a[i]; j++) {
      if (a[i] % er.P[j] == 0) {
        int x = a[i] / er.P[j];
        s[er.P[j]]++;
        if (er.is_prime[x]) {
          if (er.P[j] < x) s[x]++;
        }
      }
    }
  }
  for (int i = 0; i < 1000002; i++) {
    if (s[i] > 1) judge1 = 0;
    if (s[i] == n) judge2 = 0;
  }
  if (judge1)
    cout << "pairwise coprime" << endl;
  else if (judge2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
