#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
bool isprime[N];
int prime[N], tot;
void init() {
  for (int i = 2; i <= 1e6; i++) {
    if (!isprime[i]) {
      prime[++tot] = i;
      for (int j = 2 * i; j <= 1e6; j += i) {
        isprime[j] = true;
      }
    }
  }
}
int vis[N], a[N];
int main() {
  init();
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (!isprime[a[i]]) {
      vis[a[i]]++;
      continue;
    }
    int len = sqrt(a[i]);
    for (int j = 1; j <= tot && prime[j] <= len; j++) {
      if (a[i] % prime[j] == 0) {
        vis[prime[j]]++;
      }
    }
  }
  int flag1 = 0, flag2 = 0;
  for (int i = 1; i <= tot; i++) {
    if (vis[prime[i]] > 1) {
      flag1 = 1;
    }
    if (vis[prime[i]] == n) {
      flag2 = 1;
    }
  }
  if (!flag1) {
    cout << "pairwise coprime\n";
  } else if (flag1 && !flag2) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
