#include <bits/stdc++.h>
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
using namespace std;
int begtime = clock();
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rngb(chrono::steady_clock::now().time_since_epoch().count());
bool isPowerOfTwo(int x) { return x && (!(x & (x - 1))); }
int takemod(int x) { return (x % 1000000007 + 1000000007) % 1000000007; }
int fpow(int base, int power, int MOD) {
  int result = 1;
  base = base % MOD;
  while (power) {
    if (power & 1) result = (result * base) % MOD;
    base = (base * base) % MOD;
    power = power >> 1;
  }
  return result;
}
int modinv(int x) { return fpow(x, 1000000007 - 2, 1000000007); }
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
void solve() {
  long long int n;
  cin >> n;
  long long int res = 0;
  vector<long long int> A(n);
  long long int pr = 1;
  for (long long int i = 0; i < (n); ++i) {
    cin >> A[i];
    pr *= A[i];
    res = gcd(A[i], res);
  }
  long long int er = 0;
  if (res == 1) {
    er = 1;
  }
  for (long long int i = 0; i < (n); ++i) {
    if (gcd(pr / A[i], res) != 1) {
      er = 1;
      break;
    }
  }
  if (er == 0) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  if (res == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
