#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
long long int mx = 1000008;
long long int factor[1000008];
long long int ans[1000008];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  memset(factor, -1, sizeof(factor));
  for (long long int i = 2; i * i <= mx; i++) {
    if (factor[i] == -1) {
      for (long long int j = i * 2; j < mx; j += i) {
        if (factor[j] == -1) factor[j] = i;
      }
    }
  }
  long long int n;
  cin >> n;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (long long int i = 0; i < n; i++) {
    long long int x = arr[i];
    map<long long int, long long int> kk;
    kk[x] = 1;
    ans[x] += 1;
    while (factor[x] != -1) {
      if (kk.find(factor[x]) == kk.end()) {
        ans[factor[x]] += 1;
      }
      kk[factor[x]] = 1;
      x /= factor[x];
    }
  }
  long long int flag = 1;
  long long int check2 = 1;
  for (long long int i = 3; i < 1000008; i++) {
    if (ans[i] > 1) flag = 0;
    if (ans[i] == n) check2 = 0;
  }
  if (flag) {
    cout << "pairwise coprime"
         << "\n";
  } else {
    if (check2) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return 0;
}
