#include <bits/stdc++.h>
const int MOD = 1000000007;
using namespace std;
int vis[1000000 + 7];
int gcd(int x, int y) { return (x == 0) ? y : gcd(y % x, x); }
int main() {
  int n;
  cin >> n;
  int a[n];
  cin >> a[0];
  int ans = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    ans = gcd(ans, a[i]);
  }
  for (int i = 0; i < n; i++) {
    int x = a[i];
    for (int j = 2; j * j <= x; j++) {
      if (x % j == 0) {
        while (x % j == 0) {
          x /= j;
        }
        vis[j]++;
      }
    }
    if (x > 1) {
      vis[x]++;
    }
  }
  bool flag = 0;
  for (int i = 2; i <= 1000000; i++) {
    if (vis[i] > 1) {
      flag = 1;
      break;
    }
  }
  if (ans == 1 and flag != 0)
    cout << "setwise coprime" << '\n';
  else if (flag == 0 and ans == 1) {
    cout << "pairwise prime" << '\n';
  } else
    cout << "not coprime" << '\n';
}
