#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m = 1000000007) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long res = power(a, b / 2, m);
  res = (res * res) % m;
  if (b & 1) res = (res * a) % m;
  return res;
}
long long modinv(long long a, long long m = 1000000007) {
  return power(a, m - 2, m);
}
long long add(long long a, long long b, long long m = 1000000007) {
  long long c = (a % m + b % m);
  if (c >= m) c -= m;
  return c;
}
long long sub(long long a, long long b, long long m = 1000000007) {
  long long c = (a % m - b % m);
  if (c < 0) c += m;
  return c;
}
long long mul(long long a, long long b, long long m = 1000000007) {
  return (a * b) % m;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n], i, even = 0, p = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      even++;
    }
    if (a[i] % 3 == 0) {
      p++;
    }
  }
  if (even == n || p == n) {
    cout << "not coprime"
         << "\n";
    return (0);
  }
  if ((p == 0 || p == 1) && even <= 1) {
    cout << "pairwise coprime"
         << "\n";
    return (0);
  }
  cout << "setwise coprime"
       << "\n";
}
