#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  std::cout << x << '\n';
}
const long long INF = 1LL << 60;
vector<long long> enum_div(long long n) {
  vector<long long> divisor;
  for (long long i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      if (i != 1) divisor.push_back(i);
      if (i != 1 && i * i != n) {
        divisor.push_back(n / i);
      }
    }
  }
  return divisor;
}
long long gcd(long long x, long long y) {
  long long temp;
  while (y != 0) {
    temp = y;
    y = x % y;
    x = temp;
  }
  return (x);
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (n); i++) {
    cin >> a[i];
  }
  sort((a).begin(), (a).end(), greater<long long>());
  long long g = a[0];
  for (long long i = 0; i < (n); i++) {
    g = gcd(g, a[i]);
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  unordered_map<long long, long long> indx;
  for (long long i = 0; i < (n); i++) {
    if (indx[a[i]] > 0) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    vector<long long> temp = enum_div(a[i]);
    for (auto x : temp) {
      indx[x]++;
      if (indx[a[i]] > 0) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
