#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int all_gcd = a[0];
  for (int i = 0; i < n; i++) all_gcd = gcd(all_gcd, a[i]);
  if (all_gcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<bool> prime(1000001, true);
  prime[0] = prime[1] = false;
  for (int i = 2; i <= 1000001; i++) {
    if (prime[i]) {
      for (int j = 2 * i; j <= 1000000; j++) prime[j] = false;
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    if (prime[i]) {
      int cnt_div = 0;
      for (int j = 0; j < n; j++) {
        if (a[j] % i == 0) cnt_div++;
      }
      if (cnt_div >= 2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
