function [ x, w ] = rule17 ( n )

%*****************************************************************************80
%
%% RULE17 returns the rule of degree 17.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    07 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 = [ ...
    -.7710386602263628,0.7710386602263630, ...
    0.9803457456469387,-.9803457456469384, ...
    -.2292639639675523,0.2292639639675524, ...
    0.4847176019505991E-03,-.4847176019504780E-03, ...
    -.6189416389750175,0.6189416389750177, ...
    0.9587315519802511,-.9587315519802511, ...
    0.8409306922533750,-.8409306922533748, ...
    -.4308042054877432,0.4308042054877433, ...
    0.4761431266211590,-.4761431266211589, ...
    0.8651144531733139,-.8651144531733139, ...
    0.9846617345267017,-.9846617345267017, ...
    -.7981639404863030,0.7981639404863030, ...
    0.6877591943414725,-.6877591943414725, ...
    -.3038305486106544,0.3038305486106544, ...
    0.9852576255116258,-.9852576255116258, ...
    0.9853756930046446,-.9853756930046446, ...
    0.7024672194580522,-.7024672194580522, ...
    0.4589513024499020,-.4589513024499019, ...
    -.5838938372432102,0.5838938372432102, ...
    0.4855363777625971,-.4855363777625971, ...
    0.1909552287968119,-.1909552287968118, ...
    0.1970910744873101,-.1970910744873101, ...
    0.9070140000742543,-.9070140000742543, ...
    -.9370706813548184,0.9370706813548186, ...
    -.1024098809482286,0.1024098809482287, ...
    0.9018657853563646,-.9018657853563646, ...
    0.7422255782894629,-.7422255782894629, ...
    -.1975779250586182D-19 ];
  ys = [ ...
    -.9187170657318696,0.9187170657318696, ...
    -.9679135253250817,0.9679135253250819, ...
    -.9437800394025085,0.9437800394025085, ...
    -.9886578344699537,0.9886578344699537, ...
    -.9803491213417113,0.9803491213417113, ...
    -.8226737868824753,0.8226737868824755, ...
    -.9649601466712245,0.9649601466712245, ...
    -.8370492275539414,0.8370492275539414, ...
    -.9716943047473653,0.9716943047473653, ...
    -.6326447362896030,0.6326447362896030, ...
    0.2029425559112923,-.2029425559112922, ...
    -.7906135688735062,0.7906135688735062, ...
    -.8442560578129694,0.8442560578129694, ...
    -.3117615836793495,0.3117615836793495, ...
    0.7701659795648228,-.7701659795648226, ...
    -.4379432170880169,0.4379432170880170, ...
    -.3820619012323893,0.3820619012323894, ...
    -.6514286057161101,0.6514286057161101, ...
    -.5711068454496305,0.5711068454496305, ...
    -.8072896746317025E-01,0.8072896746317031E-01, ...
    -.8630149364726712,0.8630149364726712, ...
    -.3872678175415290,0.3872678175415290, ...
    0.5103334842355030,-.5103334842355027, ...
    -.9584329986119476,0.9584329986119474, ...
    -.6619201369182062,0.6619201369182062, ...
    -.1238115372273944,0.1238115372273945, ...
    0.2071876599633523,-.2071876599633522, ...
    0.5346688849930886D-20 ];
  ws = [ ...
    0.1261638293838951E-01,0.1261638293838951E-01, ...
    0.3408339905429266E-02,0.3408339905429266E-02, ...
    0.2796862081921473E-01,0.2796862081921473E-01, ...
    0.1252812914329644E-01,0.1252812914329644E-01, ...
    0.1635296523785200E-01,0.1635296523785200E-01, ...
    0.1720881227455075E-01,0.1720881227455075E-01, ...
    0.1523407270818440E-01,0.1523407270818440E-01, ...
    0.5600796522816800E-01,0.5600796522816800E-01, ...
    0.2382823797668716E-01,0.2382823797668716E-01, ...
    0.4513279974663867E-01,0.4513279974663867E-01, ...
    0.1931215256841166E-01,0.1931215256841166E-01, ...
    0.4158804216001467E-01,0.4158804216001467E-01, ...
    0.4685849665862760E-01,0.4685849665862760E-01, ...
    0.1200522449400290,0.1200522449400290, ...
    0.1238565802221201E-01,0.1238565802221201E-01, ...
    0.1760077392303538E-01,0.1760077392303538E-01, ...
    0.8264937698824523E-01,0.8264937698824523E-01, ...
    0.8629133710270168E-01,0.8629133710270168E-01, ...
    0.8660536182880048E-01,0.8660536182880048E-01, ...
    0.1134857467272575,0.1134857467272575, ...
    0.6518861145910534E-01,0.6518861145910534E-01, ...
    0.1184802238173896,0.1184802238173896, ...
    0.4767526390300979E-01,0.4767526390300979E-01, ...
    0.1203076112968188E-01,0.1203076112968188E-01, ...
    0.1010849820160845,0.1010849820160845, ...
    0.5753445241741756E-01,0.5753445241741756E-01, ...
    0.8946701652955226E-01,0.8946701652955226E-01, ...
    0.1312734684062163 ];

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

  return
end