#include <bits/stdc++.h>
int gcd(int a, int b);
using namespace std;
int main() {
  int n, a[1000000], i, j, flag = 0, flag1;
  cin >> n;
  for (i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (i = 1; i < n; ++i) {
    for (j = i + 1; j <= n; ++j) {
      if (gcd(a[i], a[j]) != 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  if (flag == 0)
    cout << "pairwise coprime";
  else {
    for (i = 1; i < n - 1; ++i) {
      if (gcd(gcd(a[i], a[i + 1]), a[i + 2]) == 1) flag1 = 0;
    }
    if (flag1 == 0)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  return 0;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
