#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int primes[N], cnt;
int st[N];
int main() {
  int num = 0;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    for (int i = 2; i <= x; i++) {
      if (x % i == 0) {
        st[i]++;
        num = max(num, st[i]);
        while (x % i == 0) x /= i;
      }
    }
    if (x != 1) {
      st[x]++;
      num = max(num, st[x]);
    }
  }
  if (num == 1)
    cout << "pairwise coprime" << endl;
  else if (num == n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
