#include <bits/stdc++.h>
using namespace std;
long long ggcd(long long a, long long b) {
  if (a == 0) return b;
  return ggcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, flag = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    if (m[a[i]] == 1) {
      flag = 1;
      break;
    }
    m[a[i]] = 1;
  }
  if (flag == 1) {
    long long gcd = a[0];
    for (long long i = 1; i < n; i++) gcd = ggcd(gcd, a[i]);
    if (gcd == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
    return 0;
  }
  long long pr = a[0], gcd = a[0];
  long long lcm = a[0];
  for (long long i = 1; i < n; i++) {
    lcm = (a[i] * lcm) / (ggcd(a[i], lcm));
    pr = pr * a[i];
    gcd = ggcd(gcd, a[i]);
  }
  if (lcm == pr)
    cout << "pairwise coprime";
  else if (gcd == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
