#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<int> factors(int n) {
  vector<int> f;
  for (int x = 2; x * x <= n; x++) {
    while (n % x == 0) {
      n /= x;
    }
    f.push_back(x);
  }
  if (n > 1) f.push_back(n);
  return f;
}
int main() {
  int N;
  cin >> N;
  int a[N];
  long long g;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (i)
      g = gcd(g, a[i]);
    else
      g = a[i];
  }
  if (g == 1) {
    cout << "setwise coprime" << '\n';
    return 0;
  }
  set<int> f;
  for (int i = 0; i < N; i++) {
    vector<int> v = factors(a[i]);
    for (auto x : v) {
      if (f.insert(x).second == false) {
        cout << "not coprime" << '\n';
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << '\n';
  return 0;
}
