#include <bits/stdc++.h>
inline long long int max(long long int a, long long int b) {
  return ((a > b) ? a : b);
}
inline long long int min(long long int a, long long int b) {
  return ((a > b) ? b : a);
}
inline long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
using namespace std;
long long int power(long long int a, long long int b) {
  long long int res = 1;
  a %= 1000000007;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
long long int modInverse(long long int a) { return power(a, 1000000007 - 2); }
const int N = (long long int)1e9 + 7;
struct HASH {
  size_t operator()(const pair<int, int>& x) const {
    return hash<long long>()(((long long)x.first) ^
                             (((long long)x.second) << 32));
  }
};
bool compare(long long int x, long long int y) { return x > y; }
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> arr;
  long long int val1 = 1, val2 = 1, val3;
  for (long long int i = 0; i < n; i++) {
    long long int value;
    cin >> value;
    arr.push_back(value);
  };
  val3 = arr[0];
  for (long long int i = 0; i < n; i++) {
    val1 = (val1 * arr[i]) / gcd(arr[i], val1);
    val2 = val2 * arr[i];
    val1 %= N;
    val2 %= N;
    val3 = gcd(arr[i], val3);
  }
  if (val1 == val2) {
    cout << "pairwise coprime";
    cout << "\n";
  } else if (val3 == 1) {
    cout << "setwise coprime";
    cout << "\n";
  } else {
    cout << "not coprime";
    cout << "\n";
  }
  return;
}
int main() {
  {
    ios ::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  };
  int T = 1;
  int t = 0;
  while (t++ < T) {
    solve();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
