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