#include <iostream>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <string>
#include <sstream>
#include <algorithm>
#include <climits>
#include <cmath>

using namespace std;
int a[1000000+10];

int gcd(int a, int b)
{
  if (a == 0)
    return b;
  return gcd(b % a, a);
}

// Function to find gcd of array of 
// numbers
int findGCD(int arr[], int n)
{
  int result = arr[0];
  for (int i = 1; i < n; i++)
    {
      result = gcd(arr[i], result);

      if(result == 1)
        {
          return 1;
        }
    }
  return result;
}

int findMaxGCD(int arr[], int n) 
{ 
    // Calculating MAX in array 
    int high = 0; 
    for (int i = 0; i < n; i++) 
        high = max(high, arr[i]); 
  
    // Maintaining count array 
    int count[high + 1] = {0}; 
    for (int i = 0; i < n; i++) 
        count[arr[i]]++; 
  
    // Variable to store the 
    // multiples of a number 
    int counter = 0; 
  
    // Iterating from MAX to 1 
    // GCD is always between 
    // MAX and 1. The first 
    // GCD found will be the 
    // highest as we are  
    // decrementing the potential 
    // GCD 
    for (int i = high; i >= 1; i--) 
    { 
        int j = i; 
       counter = 0; 
    
        // Iterating from current 
        // potential GCD 
        // till it is less than 
        // MAX 
        while (j <= high) 
        { 
            // A multiple found 
  
            if(count[j] >=2) 
               return j; 
  
           else if (count[j] == 1)          
                counter++;          
  
            // Incrementing potential 
            // GCD by itself 
            // To check i, 2i, 3i.... 
            j += i; 
  
            // 2 multiples found, 
            // max GCD found 
            if (counter == 2)          
                return i; 
        } 
    }
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
  int n;
  cin >> n;
  for(int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    a[i] = t;
  }
  int arr_gcd = findGCD(a, n);
  int max_gcd = findMaxGCD(a, n);
  if(max_gcd == 1) {
    cout << "pairwise coprime\n";
  } else if(arr_gcd == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
	return 0;
}
