#include <bits/stdc++.h>
using namespace std;
const int LIM = 1000010;
int mygcd(int a, int b) {
  if (a < b) {
    int t = a;
    a = b;
    b = t;
  }
  while (b) {
    int r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int gcd_a = a[0];
  for (int i = 1; i < n; i++) gcd_a = mygcd(a[i], gcd_a);
  if (gcd_a > 1) {
    cout << "not coprime" << endl;
  } else {
    vector<int> is_prime(LIM);
    for (int i = 0; i < LIM; i++) is_prime[i] = i;
    for (int i = 2; i < LIM; i++) {
      if (is_prime[i] == i) {
        for (int j = 2; i * j < LIM; j++) {
          is_prime[i * j] = i;
        }
      }
    }
    bool is_pairwise = true;
    vector<bool> is_used(LIM, false);
    for (int i = 0; i < n; i++) {
      int tmp = a[i];
      while (tmp > 1) {
        if (is_used[tmp]) {
          is_pairwise = false;
          break;
        } else {
          is_used[tmp] = true;
          int p = is_prime[tmp];
          while (tmp % p == 0) tmp /= p;
        }
      }
    }
    if (is_pairwise)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  }
  return 0;
}
