#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 5;
const double eps = 1e-8;
const int mod = 1e9 + 7;
int n, vis[N], vis2[N];
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
unsigned long long a[N];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  bool paok = true;
  bool seok = true;
  bool have1 = false;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 1) have1 = true;
  }
  unsigned long long now = a[1];
  vis[a[1]] = 1;
  for (int i = 2; i <= n; i++) {
    now = gcd(now, a[i]);
    vis[a[i]] = 1;
  }
  for (int i = 2; i <= 1e6 + 100; i++) {
    for (int j = i; j <= 1e6 + 100; j += i) {
      if (vis[j]) vis2[i]++;
    }
  }
  for (int i = 2; i <= 1e6 + 100; i++) {
    if (vis2[i] > 1) {
      paok = false;
      break;
    }
  }
  if (now != 1) seok = false;
  if (paok and !have1)
    cout << "pairwise coprime" << endl;
  else if (seok or have1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
