#include <bits/stdc++.h>
using namespace std;
vector<int> prime;
vector<bool> mark(2000550, true);
vector<int> factors[1000050], cnt(1000050, 0);
;
void sieve(int n) {
  int lim = sqrt(n);
  mark[1] = false;
  for (int i = 4; i <= n; i = i + 2) {
    mark[i] = false;
  }
  prime.push_back(2);
  for (int i = 3; i <= n; i = i + 2) {
    if (mark[i]) {
      prime.push_back(i);
      if (i <= lim) {
        for (int j = i * i; j <= n; j = j + 2 * i) {
          mark[j] = false;
        }
      }
    }
  }
}
int main() {
  sieve(2000000);
  for (int i = 0; prime[i] <= 1000000; i++) {
    for (int j = prime[i]; j <= 1000000; j = j + prime[i]) {
      factors[j].push_back(prime[i]);
    }
  }
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    for (int j = 0; j < factors[x].size(); j++) {
      cnt[factors[x][j]]++;
    }
  }
  int mx = 0;
  for (int i = 0; prime[i] <= 1000000; i++) {
    mx = max(mx, cnt[prime[i]]);
  }
  if (mx == 1) {
    cout << "pairwise coprime";
  } else if (mx == n) {
    cout << "not coprime";
  } else {
    cout << "setwise coprime";
  }
  return 0;
}
