#include <bits/stdc++.h>
using namespace std;
bool ispal(string a) {
  long long int n = a.length();
  if (n == 1)
    return true;
  else {
    int i = 0, j;
    j = n - 1;
    while (1) {
      if (a[i] != a[j]) {
        cout << i << " " << j;
        return false;
      }
      i++, j--;
      if (i == j) {
        break;
      }
    }
    return true;
  }
}
void dfs(long long int i, vector<long long int> a[], long long int vi[]) {
  if (vi[i] == 1) return;
  vi[i] = 1;
  cout << i << " ";
  for (int j = 0; j < a[i].size(); j++) {
    if (vi[a[i][j]] == false) {
      dfs(a[i][j], a, vi);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  unordered_map<int, int> m;
  for (int i = 0; i < n; i++) {
    long long int k = a[i];
    if (k % 2 == 0) {
      m[2]++;
      while (k % 2 == 0) {
        k /= 2;
      }
    }
    for (int j = 3; j <= sqrt(k); j += 2) {
      if (k % j == 0) {
        m[j]++;
        k /= j;
      }
    }
    if (k > 1) {
      m[k]++;
    }
  }
  int co = 0, f = 0;
  for (auto x : m) {
    if (x.second == 1) {
      co++;
    }
    if (x.second == n) {
      f = 1;
    }
  }
  if (f == 1) {
    cout << "not coprime";
  } else {
    if (co == m.size()) {
      cout << "pairwise coprime";
    } else {
      cout << "setwise coprime";
    }
  }
}
