#include <bits/stdc++.h>
using namespace std;
vector<long long> prime;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  prime.push_back(2);
  for (long long i = 3; i <= 100000; i++) {
    int s = (int)prime.size();
    bool f = false;
    for (int j = 0; j < s; j++) {
      if (i % prime[j] == 0) {
        f = true;
        break;
      }
    }
    if (!f) prime.push_back(i);
  }
  long long net = prime.size();
  long long setgcd = a[0];
  for (int i = 1; i < n; i++) setgcd = gcd(setgcd, a[i]);
  if (setgcd != 1) {
    cout << "not coprime"
         << "\n";
    return 0;
  }
  vector<long long> den;
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) continue;
    den.push_back(a[i]);
  }
  if (den.size() > net) {
    cout << "setwise coprime"
         << "\n";
    return 0;
  }
  int densize = den.size();
  vector<long long> check(net);
  for (int i = 0; i < densize; i++) {
    for (int j = 0; j < net; j++) {
      if (den[i] % prime[j] == 0) {
        check[j]++;
      }
    }
  }
  for (int i = 0; i < net; i++) {
    if (check[i] >= 2) {
      cout << "setwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "pairwise coprime"
       << "\n";
}
