function value = i4vec_is_pairwise_prime ( n, a )

%*****************************************************************************80
%
%% I4VEC_IS_PAIRWISE_PRIME checks that entries of an I4VEC are pairwise prime.
%
%  Discussion:
%
%    Two positive integers I and J are pairwise prime if they have no common
%    factor greater than 1.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    24 June 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the number of values to check.
%
%    Input, integer A(N), the vector of integers.
%
%    Output, logical VALUE, is true if the vector of integers
%    is pairwise prime.
%
  value = true;

  for i = 1 : n
    for j = i + 1 : n
      if ( i4_gcd ( a(i), a(j) ) ~= 1 )
        value = false;
        break;
      end
    end
  end

  return
end
