#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
int64_t mygcd(int64_t x, int64_t y) {
  if (y == 0) return x;
  return mygcd(y, x % y);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  const int lim = 1000000;
  vector<int32_t> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  bool ans1 = true, ans2 = true;
  vector<int32_t> div(lim + 1);
  vector<bool> isprime(lim + 1, true);
  div[0] = div[1] = 1;
  isprime[0] = isprime[1] = false;
  for (int i = 0; i < lim + 1; ++i) {
    if (isprime[i]) {
      div[i] = i;
      for (int j = i + i; j <= lim; j += i) {
        isprime[j] = false;
        div[j] = i;
      }
    }
  }
  for (int i = 0; i < 6; ++i) {
    cout << "div[" << i << "] = " << div[i] << "\n";
  }
  vector<bool> found(1000001, false);
  for (int i = 0; i < n; ++i) {
    int64_t x = a[i];
    set<int> temp;
    while (div[x] != 1) {
      temp.insert(div[x]);
      x /= div[x];
    }
    for (auto d : temp) {
      if (found[d]) {
        ans1 = false;
        break;
      }
      found[d] = true;
    }
    if (!ans1) break;
  }
  int64_t g = 0;
  for (int i = 0; i < n; ++i) {
    g = mygcd(g, a[i]);
  }
  ans2 = g == 1;
  if (ans1) {
    cout << "pairwise coprime"
         << "\n";
  } else if (ans2) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
  return 0;
}
