#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}
long long gcd_arr(vector<long long> a) {
  int n = a.size();
  for (int i = n - 2; i >= 0; i--) {
    a[i] = gcd(a[i], a[i + 1]);
  }
  return a.front();
}
int main() {
  int n;
  cin >> n;
  vector<long long> data;
  for (int i = (0); i < (n); ++i) {
    long long x;
    cin >> x;
    data.push_back(x);
  }
  bool gcd_all_1 = true;
  for (int i = (0); i < (n - 1); ++i) {
    for (int j = (i + 1); j < (n); ++j) {
      if (gcd(data[i], data[j]) != 1) gcd_all_1 = false;
    }
  }
  if (gcd_all_1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long gcd_all_2 = gcd_arr(data);
  if (gcd_all_2 == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
