#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void prime(int n, unordered_map<int, int> &m, int &k) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      m[i]++;
      if (n / i != i) m[n / i]++;
      if (m[i] > 1 || m[n / i] > 1) {
        k = 1;
        return;
      }
    }
  }
}
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  unordered_map<int, int> m;
  int g = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g != 1)
    cout << "not coprime";
  else {
    int p = -1;
    int k = 0;
    for (int i = 0; i < n; i++) {
      prime(a[i], m, k);
      if (k == 1) break;
    }
    if (k == 1)
      cout << "setwise coprime";
    else
      cout << "pairwise coprime";
  }
  return 0;
}
