#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
template <class T>
T mygcd(T a, T b) {
  T m, n, r;
  a = (a > 0) ? a : -a;
  b = (b > 0) ? b : -b;
  if (a > b) {
    m = a;
    n = b;
  } else {
    m = b;
    n = a;
  }
  while (n != 0) {
    r = m % n;
    m = n;
    n = r;
  }
  return m;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<bool> is_prime(1000010, true);
  is_prime[0] = false;
  is_prime[1] = false;
  for (int i = 2; i < 1000010; i++) {
    if (is_prime[i]) {
      for (int j = 2; i * j < 1000010; j++) is_prime[i * j] = false;
    }
  }
  vector<bool> is_used(1000010, false);
  bool ispair = true;
  for (int i = 0; i < n; i++) {
    int tmp = a[i];
    if (is_used[a[i]]) {
      ispair = false;
      break;
    }
    for (int j = 2; j <= tmp; j++) {
      if (tmp % j == 0) {
        if (is_used[j]) {
          ispair = false;
          break;
        } else {
          is_used[j] = true;
          while (tmp % j == 0) tmp /= j;
        }
      }
    }
  }
  if (ispair) {
    cout << "pairwise coprime" << endl;
  } else {
    int ans = a[0];
    for (int i = 1; i < n; i++) {
      ans = mygcd(ans, a[i]);
    }
    if (ans == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
