#include <bits/stdc++.h>
using namespace std;
const int MX = 1e6;
int n;
long long product = 1;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  bool pairwise = true;
  cin >> n;
  int GCD;
  for (int i = 0; i < (n); ++i) {
    int a;
    cin >> a;
    if (!i)
      GCD = a;
    else {
      GCD = gcd(GCD, a);
      if (gcd(product, a) > 1) pairwise = false;
    }
    product *= a;
  }
  if (pairwise)
    cout << "pairwise coprime";
  else if (GCD == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
