#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, i, a;
  cin >> n;
  vector<long long int> v;
  for (i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  long long int j;
  vector<long long int> m(1000001, 0);
  vector<long long int> prime(1000001, 0);
  for (i = 2; i < 1000001; i++) {
    for (j = 2; j * i < 1000001; j++) prime[i * j] = 1;
  }
  vector<long long int> pn;
  for (i = 2; i < 1000001; i++) {
    if (prime[i] == 0) pn.push_back(i);
  }
  for (i = n - 1; i >= 0; i--) {
    long long int num = v[i];
    vector<long long int> m1(1000001, 0);
    j = 0;
    while (num != 1) {
      if (num % pn[j] == 0) {
        num = num / pn[j];
        if (m1[pn[j]] == 0) m1[pn[j]] = 1;
      } else
        j++;
    }
    for (j = 0; j < 1000001; j++) {
      m[j] += m1[j];
    }
  }
  long long int cp = 0, sw = 0;
  for (i = 0; i < 1000001; i++) {
    if (m[i] > 1) cp = 1;
    if (m[i] == n) sw = 1;
  }
  if (sw == 1 && cp == 1)
    cout << "not coprime" << endl;
  else if (cp == 0)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
