function [ x, w ] = rule12 ( n )

%*****************************************************************************80
%
%% RULE12 returns the rule of degree 12.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 July 2014
%
%  Author:
%
%    Original FORTRAN77 version by Hong Xiao, Zydrunas Gimbutas.
%    This MATLAB version by John Burkardt.
%
%  Reference:
%
%    Hong Xiao, Zydrunas Gimbutas,
%    A numerical algorithm for the construction of efficient quadrature
%    rules in two and higher dimensions,
%    Computers and Mathematics with Applications,
%    Volume 59, 2010, pages 663-676.
%
%  Parameters:
%
%    Input, integer N, the number of nodes.
%
%    Output, real X(2,N), the coordinates of the nodes.
%
%    Output, real W(N), the weights.
%
  xs = [ ...
   -0.9572976997863073E+00, ...
    0.8595560056416388E+00, ...
    0.9572976997863073E+00, ...
   -0.8595560056416386E+00, ...
   -0.7788097115544194E+00, ...
    0.9834866824398721E+00, ...
    0.7788097115544196E+00, ...
   -0.9834866824398721E+00, ...
   -0.4758086252182758E+00, ...
    0.8500766736997486E+00, ...
    0.4758086252182759E+00, ...
   -0.8500766736997486E+00, ...
   -0.7558053565720815E+00, ...
    0.6478216371870107E+00, ...
    0.7558053565720815E+00, ...
   -0.6478216371870107E+00, ...
   -0.3427165560404068E+00, ...
    0.4093045616940387E+00, ...
    0.3427165560404068E+00, ...
   -0.4093045616940387E+00, ...
   -0.1381834598624653E+00, ...
    0.9589251702875349E+00, ...
    0.1381834598624654E+00, ...
   -0.9589251702875349E+00, ...
    0.7074150899644485E-01, ...
    0.6962500784917494E+00, ...
   -0.7074150899644477E-01, ...
   -0.6962500784917494E+00, ...
    0.3907362161294610E+00, ...
    0.9413272258729252E+00, ...
   -0.3907362161294609E+00, ...
   -0.9413272258729252E+00, ...
   -0.3126032252245169E-31 ];
  ys = [ ...
   -0.8595560056416389E+00, ...
   -0.9572976997863073E+00, ...
    0.8595560056416387E+00, ...
    0.9572976997863073E+00, ...
   -0.9834866824398721E+00, ...
   -0.7788097115544195E+00, ...
    0.9834866824398721E+00, ...
    0.7788097115544197E+00, ...
   -0.8500766736997486E+00, ...
   -0.4758086252182758E+00, ...
    0.8500766736997486E+00, ...
    0.4758086252182759E+00, ...
   -0.6478216371870107E+00, ...
   -0.7558053565720815E+00, ...
    0.6478216371870107E+00, ...
    0.7558053565720815E+00, ...
   -0.4093045616940387E+00, ...
   -0.3427165560404068E+00, ...
    0.4093045616940387E+00, ...
    0.3427165560404068E+00, ...
   -0.9589251702875349E+00, ...
   -0.1381834598624653E+00, ...
    0.9589251702875349E+00, ...
    0.1381834598624654E+00, ...
   -0.6962500784917494E+00, ...
    0.7074150899644481E-01, ...
    0.6962500784917494E+00, ...
   -0.7074150899644473E-01, ...
   -0.9413272258729252E+00, ...
    0.3907362161294610E+00, ...
    0.9413272258729252E+00, ...
   -0.3907362161294609E+00, ...
   -0.1114446878059780E-31 ];
  ws = [ ...
    0.2699339218118220E-01, ...
    0.2699339218118220E-01, ...
    0.2699339218118220E-01, ...
    0.2699339218118220E-01, ...
    0.2120743264134161E-01, ...
    0.2120743264134161E-01, ...
    0.2120743264134161E-01, ...
    0.2120743264134161E-01, ...
    0.8403587015611028E-01, ...
    0.8403587015611028E-01, ...
    0.8403587015611028E-01, ...
    0.8403587015611028E-01, ...
    0.9175668641747105E-01, ...
    0.9175668641747105E-01, ...
    0.9175668641747105E-01, ...
    0.9175668641747105E-01, ...
    0.1816350488471703E+00, ...
    0.1816350488471703E+00, ...
    0.1816350488471703E+00, ...
    0.1816350488471703E+00, ...
    0.4272687338421145E-01, ...
    0.4272687338421145E-01, ...
    0.4272687338421145E-01, ...
    0.4272687338421145E-01, ...
    0.1508552789574408E+00, ...
    0.1508552789574408E+00, ...
    0.1508552789574408E+00, ...
    0.1508552789574408E+00, ...
    0.5479564090947486E-01, ...
    0.5479564090947486E-01, ...
    0.5479564090947486E-01, ...
    0.5479564090947486E-01, ...
    0.2124022307685798E+00 ];

  x(1,1:n) = xs(1:n);
  x(2,1:n) = ys(1:n);
  w(1:n) = ws(1:n);

  return
end