#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() {
  for (int i = 1; i <= 1000000; i++) {
    cnt[i] = 0;
    prime[i] = true;
  }
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]] += 1;
  }
  bool flag = true;
  for (int i = 2; i * i <= 1000000; i++) {
    if (!prime[i]) continue;
    for (int j = 2 * i; j <= 1000000; j += i) {
      cnt[i] += cnt[j];
      prime[j] = false;
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    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;
}
