#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int arr[], int n, int cnt) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      cnt++;
      return 1;
    }
  }
  return result;
}
void solve() {
  long long n;
  cin >> n;
  int v[n];
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long cnt = 0;
  long long res = findGCD(v, n, cnt);
  if (res == 1) {
    if (cnt == (n - 1)) {
      cout << "pairwise coprime"
           << "\n";
      return;
    }
    cout << "setwise coprime"
         << "\n";
    return;
  }
  cout << "not coprime"
       << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t-- > 0) {
    solve();
  }
  return 0;
}
