#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main(void) {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < (ll)(n); i++) cin >> a[i];
  int k = 0;
  for (ll i = 0; i < (ll)(n - 1); i++)
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        k = gcd(a[i], a[j]);
        break;
      }
    }
  int flag = 0;
  if (k != 0)
    for (ll i = 0; i < (ll)(n); i++) {
      if (gcd(k, a[i]) == 1) {
        flag = 1;
        break;
      }
    }
  if (k == 0)
    cout << "pairwise coprime" << endl;
  else if (flag == 0)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
