#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
long long inv(long long x) {
  long long res = 1;
  long long k = mod - 2;
  long long y = x;
  while (k) {
    if (k & 1) res = (res * y) % mod;
    y = (y * y) % mod;
    k /= 2;
  }
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  set<int> prime;
  map<int, int> cnt;
  for (int i = 0; i < (int)(n); i++) {
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cnt[j]++;
        prime.insert(j);
        while (a[i] % j != 0) a[i] /= j;
      }
    }
    if (a[i] != 1) {
      cnt[a[i]]++;
      prime.insert(a[i]);
    }
  }
  int mxc = 0;
  for (auto p : prime) {
    mxc = max(cnt[p], mxc);
  }
  if (mxc == 1)
    cout << "pairwise coprime" << endl;
  else if (mxc != n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
