#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long a[n], b[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long pairwise = 1;
  b[0] = a[0];
  for (long long i = 1; i < n; i++) {
    b[i] = b[i - 1] * a[i];
  }
  for (long long i = 1; i < n; i++) {
    pairwise &= gcd(b[i - 1], a[i]);
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    long long g = a[0];
    for (long long i = 1; i < n; i++) {
      g = gcd(g, a[i]);
    }
    if (g == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
