#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
vector<int> check(1000005);
bool prime(int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      check[i]++;
      if (i * i != n) check[n / i]++;
      if (check[i] > 1 || check[n / i] > 1) return false;
    }
  }
  check[n]++;
  if (check[n] > 1) return false;
  return true;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) {
    if (!prime(v[i])) {
      break;
    }
    if (i == n - 1) {
      cout << "pairwise coprime";
      return;
    }
  }
  int gg;
  gg = gcd(v[0], v[1]);
  if (gg == 1) {
    cout << "setwise coprime";
    return;
  }
  for (int i = 2; i < n; i++) {
    gg = gcd(gg, v[i]);
    if (gg == 1) {
      cout << "setwise coprime";
      return;
    }
  }
  cout << "not coprime";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
