#include <bits/stdc++.h>
using namespace std;
vector<long long int> gr[2 * 100000 + 1];
bool vis[2 * 100000 + 1];
long long int dfs(long long int i, long long int p) {
  vis[i] = true;
  if (gr[i].size() == 1 && gr[i][0] == p) return 1;
  long long int ans = 1;
  for (auto it : gr[i]) {
    if (it != p && vis[it] == false) ans += dfs(it, i);
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    long long int ma = 0;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      ma = max(arr[i], ma);
    }
    long long int p = 0;
    bool prime[ma + 1];
    memset(prime, false, sizeof(prime));
    for (int j = 2; j <= ma; j++) {
      long long int co = 0;
      if (prime[j] == false)
        for (int i = 0; i < n; i++)
          if (arr[i] % j == 0) co++;
      if (co == n) {
        cout << "not coprime";
        return 0;
      }
      for (int i = j; i * j < n; i += j) prime[i] = true;
      p = max(p, co);
    }
    if (p > 1)
      cout << "setwise coprime";
    else {
      cout << "pairwise coprime";
    }
  }
  return 0;
}
