#include <bits/stdc++.h>
using namespace std;
long long int md = 1000000007;
map<long long int, long long int> mp;
bool add(long long int nm) {
  if (nm % 2 == 0) {
    if (mp[2] == 1) return false;
    while (nm % 2 == 0) nm /= 2;
    mp[2] = 1;
  }
  for (long long int i = 3; i * i <= nm; i++) {
    if (nm % i == 0) {
      if (mp[nm] == 1) return false;
      while (nm % i == 0) nm /= i;
      mp[i] = 1;
    }
  }
  return true;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  bool flag = true;
  for (long long int i = 0; i < n; i++)
    if (add(a[i]) == false) {
      flag = false;
      break;
    }
  if (flag) {
    cout << "pairwise coprime";
    return 0;
  }
  long long int g = a[0];
  for (long long int i = 1; i < n; i++) g = gcd(g, a[i]);
  if (g == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  return 0;
}
