#include <bits/stdc++.h>
using namespace std;
vector<long long int> list_factor(1000005 + 1);
void solve() {
  list_factor[1] = 1;
  for (long long int i = 2; i <= 1000005; i++) {
    if (!list_factor[i]) {
      list_factor[i] = i;
      for (long long int j = 2 * i; j <= 1000005; j += i)
        if (list_factor[j] == 0) list_factor[j] = i;
    }
  }
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void trozen() {
  solve();
  long long int n;
  cin >> n;
  vector<long long int> v1(1000005 + 1);
  vector<long long int> arr(n);
  bool flag = true;
  long long int temp;
  for (auto i = 0; i < (n); i++) {
    cin >> temp;
    arr[i] = temp;
    v1[list_factor[temp]]++;
    if (v1[list_factor[temp]] > 1) flag = false;
  }
  if (flag) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  long long int result = arr[0];
  for (long long int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      cout << "setwise coprime"
           << "\n";
      return;
    }
  }
  cout << "not coprime"
       << "\n";
}
int32_t main() {
  cin.tie(NULL);
  cout.tie(NULL);
  std::ios_base::sync_with_stdio(false);
  trozen();
  return 0;
}
