#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9 + 5;
double PI = 3.14159265358979323846;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T lcm(T a, T b) {
  return (a * b) / gcd(a, b);
}
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int pro = 1;
  long long int L = 1;
  long long int gall;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    pro *= a[i];
    pro %= mod;
    L = lcm(L, a[i]);
    L %= mod;
    if (i) {
      gall = gcd(gall, a[i]);
    } else {
      gall = a[i];
    }
  }
  if (pro == L) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  if (gall == 1) {
    cout << "setwise coprime"
         << "\n";
    return;
  }
  cout << "not coprime"
       << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
