function [ x, w ] = rule24 ( n )

%*****************************************************************************80
%
%% RULE24 returns the rule of degree 24.
%
%  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 = [ ...
    -.9947148928250171,0.9910990446809216, ...
    0.9693866534373358,0.8366669887301708, ...
    0.9976180969133432,-.9626395872771291, ...
    -.9956012694874316,0.9827883755011416, ...
    0.9899696481565038,-.1027795858264751, ...
    -.5372013809570906,-.1302736589054738, ...
    -.9966597496356319,-.8416889461091814, ...
    -.9888026187105032,0.5314747340473951, ...
    -.8162827902273060,0.9739798586001176, ...
    -.9411304883795972,-.9821743630414852, ...
    -.8146483736791913,0.2216111751930999, ...
    0.9919273511735743,0.8515268909036164, ...
    -.6344208939912110E-01,0.8124697219833941, ...
    -.9159342331978603,0.1939576002609792, ...
    0.9879450437516667,0.2535126040886103, ...
    -.9628662071921108,0.8784885445188073, ...
    -.8980693800663294,-.4876187319409098, ...
    0.8244493216582833,-.7771226957924775E-01, ...
    0.9133806640305893,-.2863497657037777, ...
    -.7746256411943806,0.8788745310361548, ...
    -.9610911899226917,0.9600320888811048, ...
    0.9425138210931967,0.7626320556994604, ...
    -.3308772778351785,0.1279919952613696, ...
    0.5294732769614892,0.3555627902477361, ...
    -.9279977222115954,0.9931449449560651, ...
    0.5102490315575532E-01,-.7525118688957001, ...
    -.4719724839934526,0.1520260254758981, ...
    0.9489604126336816,-.2169062988895815, ...
    -.8687157102597637,-.7360447596642431, ...
    0.8497144016937899,-.6403949304059380, ...
    0.9160879280172893,0.5974122417304695, ...
    0.9356564573866695,0.2602110178808541E-02, ...
    0.2185370159809754,-.4174601636720920, ...
    -.6704915695516799,0.7098684394657311, ...
    -.6662903518807954,0.6842750704411169, ...
    0.6940401495592319,0.2055436622280245, ...
    0.5409016726579078,-.2111056222157408, ...
    0.4249715565953610,-.4579852398972861, ...
    -.4762834069005017,-.3112968492969387, ...
    -.9861402159543649,0.5994434867749180, ...
    -.6329536320758256,0.4071516862564607, ...
    -.5899049368040069,-.8873886456704851, ...
    -.9429884035167735,-.8103411028772554, ...
    -.6172197178932676,0.4403002993242678, ...
    -.5964555068203565,0.4214363261995724, ...
    -.2167017340827659,0.3600751655325609, ...
    0.9573652308066442E-02,-.1986519498186896, ...
    0.5940360363603530,0.7449094683537840, ...
    0.3446198859685110,0.7550496004921502, ...
    0.2034447821293972,-.8764429892755836, ...
    -.9821148921468710E-02,-.4283906719131795, ...
    -.2565291139819166,-.4253124084387095, ...
    -.4107973035474266,0.6107899647074595, ...
    -.7740269973316680,-.9874686104628365, ...
    -.1780069523272345E-01 ];
  ys = [ ...
    0.9921816068213789,0.9927512676582938, ...
    -.9807210913639813,-.9849335979706825, ...
    -.9031203174435843,-.9807185407289059, ...
    0.1826280218638680,0.1985977578306220E-03, ...
    -.1343242025779884,0.9836572598301550, ...
    -.9945228775385402,-.9932466930618153, ...
    -.9021729201562282,0.9919450680865269, ...
    -.5469411165135486,-.9946152107188805, ...
    -.9833999582719447,-.7694911408818028, ...
    0.9454206624475765,0.5820485751363867, ...
    0.8726697552774600,0.9884035519660979, ...
    0.3773859079404019,0.9854732000616159, ...
    0.7430686212004588,-.8172733392382462, ...
    0.7368090773498677,0.8191066542200217, ...
    -.5129857572745989,0.7339438859190308, ...
    0.3121292180404563,0.4238556817241846, ...
    -.9023577502860924,-.8635258163522489, ...
    -.5019428343401774,-.9100031022978671, ...
    -.6538056836085887,0.9419753943798090, ...
    -.8083978001656728,0.7971819583886433, ...
    -.7612052337333153,0.6275466264499783, ...
    0.1573227985990733,0.6249214522371203, ...
    -.9587696584061124,-.9822260622287698, ...
    -.8459845466706856,-.6962190414609735, ...
    -.3797057196057647,0.8208860694583049, ...
    0.9117911472030502,0.2466478148353290, ...
    0.2531249337761478,-.8311014632352622, ...
    0.9327963019854183,0.3901208978319467, ...
    -.6258430618900800,-.4854699629184363, ...
    -.8013355833035751E-01,0.7663811452715913, ...
    -.9064248594697549,0.9816002629218432, ...
    -.3156827868701995,0.5928915583696132, ...
    -.2758048916460264E-01,0.6590354293018823, ...
    -.9381955060600012,-.2998249948498765, ...
    0.9581605160533719,-.6881340269166623, ...
    -.9406665893940601,0.3996485712287530, ...
    -.5101678225103823,-.4421541038328301, ...
    0.5912997929743822,0.9932623278482910, ...
    0.8781241163707275,0.5625436230792860, ...
    -.1854744570391582,0.7725191379684401, ...
    -.2272561659397919E-01,-.2598606537214366, ...
    0.4549553364199058,0.4412559753061466, ...
    -.7387531735800691E-02,-.1993131251585695, ...
    -.7001646090032370,0.8894305723468252, ...
    -.3651421534696686,0.2021031040499760, ...
    -.4759573989947036E-01,0.9560701833067996, ...
    -.2523062776553245,0.8029027500701331, ...
    -.3052326412673496E-01,0.9085765488533346, ...
    -.9429472498836997,0.1985140340578119, ...
    -.4744209684134443,0.8925996493449884E-01, ...
    0.1788338183287970,-.5864723938922081, ...
    -.7750597333889675,-.2335671290163587, ...
    0.1465570094281399,0.4191985939494091, ...
    0.6100181397154107,0.8429972982275405, ...
    -.6496814943785820 ];
  ws = [ ...
    0.7673500038857188E-03,0.8868846753542908E-03, ...
    0.2702370475569613E-02,0.5392375480513576E-02, ...
    0.1761998115149276E-02,0.3252629117203137E-02, ...
    0.4483878506691741E-02,0.4387445903456329E-02, ...
    0.6293360138903417E-02,0.9110559046011608E-02, ...
    0.4960172913990594E-02,0.4540132762921259E-02, ...
    0.2380910242803054E-02,0.4079407684566781E-02, ...
    0.7372795522491610E-02,0.5764065832069020E-02, ...
    0.5996283579933687E-02,0.8231405547532079E-02, ...
    0.7742564602285441E-02,0.9689437679198899E-02, ...
    0.1992786357523802E-01,0.7578960870331433E-02, ...
    0.7297515243700454E-02,0.5560565572125132E-02, ...
    0.1431910744302743E-01,0.2083181247879573E-01, ...
    0.1871125538452946E-01,0.1856480159069449E-01, ...
    0.7926961712192319E-02,0.3149563402986980E-01, ...
    0.1220979773721510E-01,0.3064077139403503E-01, ...
    0.1246839879952511E-01,0.2727439670515271E-01, ...
    0.2989955062354429E-01,0.2568927037462639E-01, ...
    0.1731775418487197E-01,0.1651762549497732E-01, ...
    0.2348412516559215E-01,0.2103194138017257E-01, ...
    0.1218315588129536E-01,0.1587611356755889E-01, ...
    0.2192984739792703E-01,0.3559892184688495E-01, ...
    0.1598768389647512E-01,0.9998012603521544E-02, ...
    0.3014828623151700E-01,0.4445807626369159E-01, ...
    0.2303305529498344E-01,0.4177457820842124E-02, ...
    0.2595692066159871E-01,0.4297075322654262E-01, ...
    0.2734909126669048E-01,0.3576989995633175E-01, ...
    0.8104038598451695E-02,0.5896633070443507E-01, ...
    0.2530733931631170E-01,0.3397799558910337E-01, ...
    0.3681905878262371E-01,0.3127418749936042E-01, ...
    0.1043340150186936E-01,0.9877922117697804E-02, ...
    0.2268684828187055E-01,0.5274200508727377E-01, ...
    0.6668503169982437E-01,0.4053161003772505E-01, ...
    0.1580741394786280E-01,0.4437844031312334E-01, ...
    0.1465934495793213E-01,0.3316127050631540E-01, ...
    0.1633165248572775E-01,0.6234782740688132E-01, ...
    0.4701994260472551E-01,0.5761066620189915E-01, ...
    0.4794170534889713E-01,0.5798541312289998E-02, ...
    0.2505250386803961E-01,0.2055053414266298E-01, ...
    0.8995847445576632E-02,0.3472177169167036E-01, ...
    0.5444084929958415E-01,0.5971645153263631E-01, ...
    0.4912587830256034E-01,0.2538968252075221E-01, ...
    0.1542318408388366E-01,0.4013335870948910E-01, ...
    0.3298688496369413E-01,0.2322125010689848E-01, ...
    0.3671677541506277E-01,0.6139982772160751E-01, ...
    0.6362592843510947E-01,0.9567538562556033E-02, ...
    0.6459890039693177E-01,0.3562315409338049E-01, ...
    0.5516254605923790E-01,0.1998312905915403E-01, ...
    0.2052118732484228E-01,0.4458997988822495E-01, ...
    0.5811519536921120E-01,0.2297223481430297E-01, ...
    0.6766667516677112E-01,0.4532069980219111E-01, ...
    0.4089559205492352E-01,0.5328231011100253E-01, ...
    0.4369211916320918E-01,0.4895075796108013E-01, ...
    0.3261352596485557E-01,0.5100190068919709E-02, ...
    0.5182667283735970E-01 ];

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

  return
end