#include <bits/stdc++.h>
using namespace std;
bool setwise = 0;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int func(long long a[], int start, int end) {
  if (start == end) {
    return a[start];
  }
  if (start == end - 1) {
    long long g = gcd(a[start], a[end]);
    if (g == 1) {
      setwise = 1;
    }
    return (long long)((a[start] * a[end]) / g);
  }
  int mid = (start + end) / 2;
  long long l1 = func(a, start, mid);
  long long l2 = func(a, mid + 1, end);
  long long g = gcd(l1, l2);
  if (g == 1) setwise = 1;
  return (long long)((l1 * l2) / g);
}
int solve() {
  int n;
  cin >> n;
  long long a[n], tot = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    tot *= a[i];
  }
  long long lcm = a[0], g = a[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
    lcm = (a[i] * lcm) / gcd(lcm, a[i]);
  }
  if (lcm == tot)
    cout << "pairwise coprime";
  else if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime\n";
  return 0;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
