#include <bits/stdc++.h>
using namespace std;
int c[1000005];
vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int MAX = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    MAX = max(MAX, a[i]);
  }
  auto t = prime_table(MAX);
  vector<int> prime;
  for (int i = 2; i <= MAX; i++)
    if (t[i] == true) prime.push_back(i);
  int flag = 0;
  for (int i = 0; i < n; i++) {
    for (auto u : prime) {
      if (u > a[i])
        break;
      else if (a[i] % u == 0)
        c[u]++;
      if (c[u] > 1) flag++;
      if (c[u] == n) {
        cout << "not coprime";
        return 0;
      }
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime";
    return 0;
  }
  cout << "setwise coprime";
  return 0;
}
