#include <bits/stdc++.h>
using namespace std;
void Print2DVector(vector<vector<int>>& v) {
  unsigned long long i, j;
  for (i = 0; i < v.size(); i++) {
    for (j = 0; j < v[i].size(); j++) {
      cout << v[i][j];
      if (j == v[i].size() - 1) {
        cout << endl;
      } else {
        cout << " ";
      }
    }
  }
}
void PrintVector(vector<int>& v) {
  unsigned long long i;
  for (i = 0; i < v.size(); i++) {
    cout << v[i];
    if (i == v.size() - 1) {
      cout << endl;
    } else {
      cout << " ";
    }
  }
}
void PrintArr(int* a, unsigned long long N) {
  unsigned long long i;
  for (i = 0; i < N; i++) {
    cout << a[i];
    if (i == N - 1) {
      cout << endl;
    } else {
      cout << " ";
    }
  }
}
void PreProcessTables() {
  unsigned long long i, j;
  for (i = 0; i < 0; i++) {
    for (j = 0; j < 0; j++) {
      break;
    }
    break;
  }
}
void TC(int t) {
  int N;
  cin >> N;
  int val, max_val = 0;
  bool A[1000001] = {
      false,
  };
  for (int i = 0; i < N; i++) {
    cin >> val;
    A[val] = true;
    max_val = max(max_val, val);
  }
  int mx = 1, cnt;
  bool sieve[1000001] = {
      false,
  };
  for (int i = 2; i < max_val + 1; i += (i > 2) ? 2 : 1) {
    if (!sieve[i]) {
      cnt = 0;
      for (int j = i; j < max_val + 1; j += i) {
        sieve[j] = true;
        if (A[j]) {
          cnt++;
        }
      }
      if (cnt > 0) {
        mx = max(mx, cnt);
      }
    }
  }
  if (mx == 1) {
    cout << "pairwise coprime" << endl;
  } else if (mx < N) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  PreProcessTables();
  int T = 1, t;
  for (t = 1; t <= T; t++) {
    TC(t);
  }
  return 0;
}
