function value = i4vec_is_coprime ( a )

%*****************************************************************************80
%
%% i4vec_is_coprime(): all entries are coprime.
%
%  Discussion:
%
%    I4VEC is assumed to be a vector of positive integers.
%
%    Any two entries I and J are coprime if their greatest common divisor is 1.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    13 December 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer A(N), the vector to be analyzed.
%
%  Output:
%
%    logical VALUE: true if all pairs of entries are coprime.
%
  value = true;

  n = length ( a );

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

  return
end

