#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct edge {
  int to, id;
};
using graph = vector<vector<ll>>;
int main() {
  ll n;
  cin >> n;
  ll a[n];
  ll upper = -1;
  ll lower = 1000002;
  for (int i = 0; i < (int)(n); i++) {
    ll temp;
    cin >> temp;
    a[i] = temp;
    upper = max(temp, upper);
    lower = min(temp, lower);
  }
  int judge[upper + 10];
  for (int i = 0; i <= upper; i++) {
    judge[i] = 1;
  }
  bool non = false;
  bool pair = true;
  for (ll i = 2; i <= upper; i++) {
    if (judge[i] == 0) continue;
    int count = 0;
    for (ll j = 0; j < n; j++) {
      if (a[j] % i == 0) {
        count++;
      }
    }
    if (count == 0 || count == 1) {
      for (ll k = i; k <= upper; k += i) {
        judge[k] = 0;
      }
    } else if (count == n) {
      non = true;
      cout << "not coprime" << endl;
      return 0;
    } else {
      pair = false;
    }
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else {
    cout << "setwise coprime" << endl;
    return 0;
  }
}
