#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long fact_table = 3200008;
long double Pi = 3.1415926535897932384626;
priority_queue<long long> pql;
priority_queue<pair<long long, long long>> pqp;
priority_queue<pair<long long, long long>> bag;
priority_queue<long long, vector<long long>, greater<long long>> pqls;
priority_queue<pair<long long, long long>, vector<pair<long long, long long>>,
               greater<pair<long long, long long>>>
    pqps;
long long dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
const long long mod = 1000000007ll;
long long mypow(long long a, long long b, long long mod) {
  long long x = 1;
  while (b) {
    while (!(b & 1)) {
      (a *= a) %= mod;
      b >>= 1;
    }
    (x *= a) %= mod;
    b--;
  }
  return x;
}
void YES(bool cond) {
  if (cond) {
    cout << "YES"
         << "\n";
    ;
  } else {
    cout << "NO"
         << "\n";
    ;
  }
  return;
}
void Yes(bool cond) {
  if (cond) {
    cout << "Yes"
         << "\n";
    ;
  } else {
    cout << "No"
         << "\n";
    ;
  }
  return;
}
void line() {
  cout << "--------------------"
       << "\n";
  ;
  return;
}
struct Timer {
  int64_t start;
  const int64_t CYCLES_PER_SEC = 2800000000;
  Timer() { reset(); }
  void reset() { start = getCycle(); }
  inline double get() { return (double)(getCycle() - start) / CYCLES_PER_SEC; }
  inline int64_t getCycle() {
    uint32_t low, high;
    __asm__ volatile("rdtsc" : "=a"(low), "=d"(high));
    return ((int64_t)low) | ((int64_t)high << 32);
  }
};
bool multicase = false;
long long n, m, k, w, a, b, c, d, e, h, q, ans, sum, l;
long long mygcd(long long a, long long b) {
  if (b > a) swap(a, b);
  if (b == 0 || a == b) return a;
  return mygcd(b, a % b);
}
void solve() {
  cin >> n;
  vector<long long> x(n), y(n);
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    y[i] = x[i];
  }
  vector<long long> table(n, 0);
  bool find = false;
  for (int i = 0; i < n; i++) {
    for (int j = 2; j * j <= x[i]; j++) {
      bool divid = false;
      while (x[i] % j == 0) {
        x[i] /= j;
        divid = true;
      }
      if (divid) {
        if (table[j] >= 1) {
          find = true;
          break;
        }
        table[j]++;
      }
    }
    if (x[i] != 1) {
      if (table[x[i]] >= 1) {
        find = true;
        break;
      }
      table[x[i]]++;
    }
  }
  if (!find) {
    cout << "pairwise coprime"
         << "\n";
    ;
    return;
  }
  long long my = y[0];
  for (int i = 1; i < n; i++) {
    my = mygcd(my, y[i]);
  }
  if (my == 1) {
    cout << "setwise coprime"
         << "\n";
    ;
    return;
  }
  cout << "not coprime"
       << "\n";
  ;
  return;
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long q, testcase = 1;
  if (multicase) {
    cin >> q;
  } else {
    q = 1;
  }
  while (q--) {
    solve();
    testcase++;
  }
  return 0;
}
