#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<bool> prime(10000001, false);
  for (long long int i = 2; i <= 10000001; i++) {
    if (prime[i] == false) {
      for (long long int j = 2 * i; j <= 10000001; j += i) {
        prime[j] = true;
      }
    }
  }
  vector<int> ans(n);
  int c = 0, g = 0;
  for (int i = 0; i < n; i++) {
    cin >> ans[i];
    g = gcd(g, ans[i]);
    if (prime[ans[i]] == false) c++;
  }
  if (c == n) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
