#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  long long n, ans = 0;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  long long g = 0;
  for (int i = 0; i < (n); i++) g = gcd(g, a[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < (n); i++)
    for (int j = i + 1; j < n; ++j)
      if (gcd(a[i], a[j]) != 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
  cout << "pairwise coprime" << endl;
  return 0;
}
