#include <bits/stdc++.h>
using namespace std;
unordered_map<long long int, vector<long long int>> adj;
vector<long long int> vis(300005, 0);
vector<long long int> p(100005, 0);
long long int c[100005];
long long int cnt;
void dfs(long long int node) {
  if (vis[node]) return;
  vis[node] = 1;
  cnt++;
  for (auto i : adj[node]) {
    dfs(i);
  }
}
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int i;
  for (i = 0; i < n; i++) cin >> a[i];
  bool prime[1000001];
  memset(prime, true, sizeof(prime));
  long long int j, cnt = 0, flag = 0, flag1 = 0;
  for (i = 2; i * i <= 1000000; i++) {
    cnt = 0;
    for (j = 0; j < n; j++) {
      if (a[j] % i == 0) {
        cnt++;
      }
      if (cnt > 1) {
        flag = 1;
      }
      if (cnt == n) {
        flag1 = 1;
      }
    }
  }
  if (!flag) {
    cout << "pairwise coprime";
  } else if (flag1) {
    cout << "not coprime";
  } else {
    cout << "setwise coprime";
  }
}
