#include <bits/stdc++.h>
using namespace std;
int n;
int cnt[1000009];
bool prime[1000009];
int __gcd(int a, int b) {
  if (a == 0) return b;
  return __gcd(b % a, a);
}
int main() {
  memset(cnt, 0, sizeof cnt);
  memset(prime, true, sizeof prime);
  cin >> n;
  vector<int> a(n);
  bool flag;
  flag = true;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]] += 1;
  }
  for (int i = 2; i * i <= 1000000; i++) {
    if (!prime[i]) continue;
    for (int j = i * i; j <= 1000000; j += i) {
      if (cnt[j] > 0) cnt[i] += 1;
      if (cnt[i] >= 2) {
        break;
      }
      prime[j] = false;
    }
    if (cnt[i] >= 2) {
      flag = false;
    }
    break;
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else {
    int gg = a[0];
    for (int i = 1; i < n; i++) {
      gg = __gcd(gg, a[i]);
    }
    if (gg == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
