#include <bits/stdc++.h>
using namespace std;
int lpfact[1000005];
void seive() {
  lpfact[0] = lpfact[1] = 1;
  for (int i = 2; i <= 1000000; i += 2) {
    lpfact[i] = 2;
  }
  for (int i = 3; i <= 1000000; i += 2) {
    if (!lpfact[i]) {
      for (int j = 1; i * j <= 1000000; j++) {
        if (!lpfact[i * j]) {
          lpfact[i * j] = i;
        }
      }
    }
  }
}
int main() {
  int t = 1;
  seive();
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n), vis(1000001, 0);
    vector<set<int> > pfs(n);
    bool ispairwise = 1;
    bool coprime = 1;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      int x = a[i];
      if (x == 1) ispairwise = 0, coprime = 1;
      while (x > 1) {
        pfs[i].insert(lpfact[x]);
        x /= lpfact[x];
      }
      for (int y : pfs[i]) {
        if (vis[y]) {
          ispairwise = 0;
          vis[y] = 1;
          break;
        }
        vis[y] = 1;
      }
    }
    set<int> intersection;
    for (int i = 0; i < n; i++) {
      if (intersection.empty()) {
        for (int x : pfs[i]) {
          intersection.insert(x);
        }
      } else {
        set<int> newIntersection;
        for (int x : pfs[i]) {
          if (intersection.find(x) != intersection.end())
            newIntersection.insert(x);
        }
        intersection = newIntersection;
      }
    }
    if (coprime) {
      cout << "setwise coprime" << endl;
    } else if (ispairwise) {
      cout << "pairwise coprime" << endl;
    } else {
      if (intersection.size() != 0) {
        cout << "not coprime" << endl;
      } else {
        cout << "setwise coprime" << endl;
      }
    }
  }
  return 0;
}
