#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000;
long long int mod = 1e9 + 7;
int n;
int a[maxn];
int cnt[maxn + 1] = {0};
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cnt[j]++;
        if (a[i] != j * j) cnt[a[i] / j]++;
      }
    }
  }
  string ans;
  bool key = true;
  for (int i = 2; i <= n; i++) {
    if (cnt[i] > 1) {
      key = false;
      break;
    }
  }
  if (key) {
    ans = "pairwise coprime";
  } else {
    bool key2 = false;
    for (int i = 2; i <= n; i++) {
      if (cnt[i] == n) {
        key2 = true;
        break;
      }
    }
    if (key2) {
      ans = "not coprime";
    } else {
      ans = "setwise coprime";
    }
  }
  cout << ans << endl;
  return 0;
}
