#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];
  int d = a[0];
  for (int i = 0; i < (int)(n); i++) {
    d = gcd(d, a[i]);
  }
  if (d != 1)
    cout << "not coprime" << endl;
  else {
    if (n > 78500)
      cout << "setwise coprime" << endl;
    else {
      vector<int> prime;
      vector<int> flag(1000);
      flag[0] = flag[1] = 1;
      for (int i = 0; i < (int)(1000); i++) {
        if (flag[i] == 0) {
          prime.push_back(i);
          for (int j = i; j <= 1000; j += i) {
            flag[j] = 1;
          }
        }
      }
      bool sw = false;
      map<int, int> cnt;
      for (int i = 0; i < (int)(n); i++) {
        for (int j = 0; j < (int)(prime.size()); j++) {
          int p = prime[j];
          if (a[i] % p == 0) {
            cnt[p]++;
            if (cnt[p] > 1) sw = true;
            while (a[i] % p == 0) a[i] /= p;
          }
        }
        if (a[i] != 1) {
          cnt[a[i]]++;
          if (cnt[a[i]] > 1) sw = true;
        }
      }
      if (sw)
        cout << "setwise coprime" << endl;
      else
        cout << "pairwise coprime" << endl;
    }
  }
}
