#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int overall_gcd(vector<int> &arr) {
  int res = arr[0];
  for (int i = 1; i < arr.size(); i++) {
    res = gcd(arr[i], res);
    if (res == 1) return 1;
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  int flag = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(arr[i], arr[j]) != 1) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 0)
    cout << "pairwise coprime";
  else if (overall_gcd(arr) == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
signed main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
}
