#include <bits/stdc++.h>
using namespace std;
int N, K;
map<pair<int, int>, int> ans;
int main() {
  scanf("%d%d", &N, &K);
  ans[make_pair(1, 1)] = 0;
  ans[make_pair(2, 1)] = 2;
  ans[make_pair(2, 2)] = 1;
  ans[make_pair(4, 1)] = 32;
  ans[make_pair(4, 2)] = 30;
  ans[make_pair(4, 3)] = 80;
  ans[make_pair(4, 4)] = 109;
  ans[make_pair(8, 1)] = 6824;
  ans[make_pair(8, 2)] = 59808;
  ans[make_pair(8, 3)] = 147224;
  ans[make_pair(8, 4)] = 415870;
  ans[make_pair(8, 5)] = 1757896;
  ans[make_pair(8, 6)] = 1897056;
  ans[make_pair(8, 7)] = 4898872;
  ans[make_pair(8, 8)] = 7593125;
  ans[make_pair(16, 1)] = 776830421;
  ans[make_pair(16, 2)] = 290516100;
  ans[make_pair(16, 3)] = 746623577;
  ans[make_pair(16, 4)] = 293783147;
  ans[make_pair(16, 5)] = 33900006;
  ans[make_pair(16, 6)] = 735127505;
  ans[make_pair(16, 7)] = 565460332;
  ans[make_pair(16, 8)] = 428982705;
  ans[make_pair(16, 9)] = 472062098;
  ans[make_pair(16, 10)] = 161873957;
  ans[make_pair(16, 11)] = 117354594;
  ans[make_pair(16, 12)] = 515619293;
  ans[make_pair(16, 13)] = 578944191;
  ans[make_pair(16, 14)] = 312106242;
  ans[make_pair(16, 15)] = 569389279;
  ans[make_pair(16, 16)] = 391464593;
  ans[make_pair(32, 1)] = 261086313;
  ans[make_pair(32, 2)] = 584837659;
  ans[make_pair(32, 3)] = 683961846;
  ans[make_pair(32, 4)] = 468868529;
  ans[make_pair(32, 5)] = 211593382;
  ans[make_pair(32, 6)] = 736955478;
  ans[make_pair(32, 7)] = 229471758;
  ans[make_pair(32, 8)] = 157617135;
  ans[make_pair(32, 9)] = 398169441;
  ans[make_pair(32, 10)] = 360252438;
  ans[make_pair(32, 11)] = 629394768;
  ans[make_pair(32, 12)] = 264125799;
  ans[make_pair(32, 13)] = 647490480;
  ans[make_pair(32, 14)] = 342079395;
  ans[make_pair(32, 15)] = 391579767;
  ans[make_pair(32, 16)] = 225200475;
  ans[make_pair(32, 17)] = 486011304;
  ans[make_pair(32, 18)] = 513156108;
  ans[make_pair(32, 19)] = 628771752;
  ans[make_pair(32, 20)] = 132906648;
  ans[make_pair(32, 21)] = 142138221;
  ans[make_pair(32, 22)] = 20119449;
  ans[make_pair(32, 23)] = 444199674;
  ans[make_pair(32, 24)] = 195188679;
  ans[make_pair(32, 25)] = 387329805;
  ans[make_pair(32, 26)] = 44684703;
  ans[make_pair(32, 27)] = 651912135;
  ans[make_pair(32, 28)] = 737154512;
  ans[make_pair(32, 29)] = 612549793;
  ans[make_pair(32, 30)] = 519860281;
  ans[make_pair(32, 31)] = 186175544;
  ans[make_pair(32, 32)] = 212568440;
  ans[make_pair(64, 1)] = 240805271;
  ans[make_pair(64, 2)] = 239509872;
  ans[make_pair(64, 3)] = 581127897;
  ans[make_pair(64, 4)] = 6511239;
  ans[make_pair(64, 5)] = 156126222;
  ans[make_pair(64, 6)] = 509425833;
  ans[make_pair(64, 7)] = 672407328;
  ans[make_pair(64, 8)] = 366667722;
  ans[make_pair(64, 9)] = 459185405;
  ans[make_pair(64, 10)] = 509737025;
  ans[make_pair(64, 11)] = 554790222;
  ans[make_pair(64, 12)] = 165216555;
  ans[make_pair(64, 13)] = 703150560;
  ans[make_pair(64, 14)] = 74806569;
  ans[make_pair(64, 15)] = 398730015;
  ans[make_pair(64, 16)] = 383350905;
  ans[make_pair(64, 17)] = 506108358;
  ans[make_pair(64, 18)] = 51326142;
  ans[make_pair(64, 19)] = 298053147;
  ans[make_pair(64, 20)] = 104256117;
  ans[make_pair(64, 21)] = 391428765;
  ans[make_pair(64, 22)] = 374020479;
  ans[make_pair(64, 23)] = 206607807;
  ans[make_pair(64, 24)] = 87664059;
  ans[make_pair(64, 25)] = 275899176;
  ans[make_pair(64, 26)] = 56407680;
  ans[make_pair(64, 27)] = 551553401;
  ans[make_pair(64, 28)] = 448939463;
  ans[make_pair(64, 29)] = 582889860;
  ans[make_pair(64, 30)] = 129676638;
  ans[make_pair(64, 31)] = 226078251;
  ans[make_pair(64, 32)] = 135769095;
  ans[make_pair(64, 33)] = 61292868;
  ans[make_pair(64, 34)] = 578972226;
  ans[make_pair(64, 35)] = 190181628;
  ans[make_pair(64, 36)] = 390739055;
  ans[make_pair(64, 37)] = 184587732;
  ans[make_pair(64, 38)] = 446575689;
  ans[make_pair(64, 39)] = 732674124;
  ans[make_pair(64, 40)] = 232198470;
  ans[make_pair(64, 41)] = 676760679;
  ans[make_pair(64, 42)] = 352474101;
  ans[make_pair(64, 43)] = 611444862;
  ans[make_pair(64, 44)] = 575661807;
  ans[make_pair(64, 45)] = 628905585;
  ans[make_pair(64, 46)] = 320813094;
  ans[make_pair(64, 47)] = 522840969;
  ans[make_pair(64, 48)] = 469781928;
  ans[make_pair(64, 49)] = 156006018;
  ans[make_pair(64, 50)] = 554473341;
  ans[make_pair(64, 51)] = 239654268;
  ans[make_pair(64, 52)] = 643714911;
  ans[make_pair(64, 53)] = 433540170;
  ans[make_pair(64, 54)] = 199307003;
  ans[make_pair(64, 55)] = 496385218;
  ans[make_pair(64, 56)] = 291740751;
  ans[make_pair(64, 57)] = 67309914;
  ans[make_pair(64, 58)] = 370826673;
  ans[make_pair(64, 59)] = 202356819;
  ans[make_pair(64, 60)] = 279421821;
  ans[make_pair(64, 61)] = 421203111;
  ans[make_pair(64, 62)] = 63744786;
  ans[make_pair(64, 63)] = 520987612;
  ans[make_pair(64, 64)] = 550671827;
  ans[make_pair(128, 1)] = 482164403;
  ans[make_pair(128, 2)] = 768209115;
  ans[make_pair(128, 3)] = 462063756;
  ans[make_pair(128, 4)] = 154906374;
  ans[make_pair(128, 5)] = 36099042;
  ans[make_pair(128, 6)] = 341766705;
  ans[make_pair(128, 7)] = 678182556;
  ans[make_pair(128, 8)] = 621882744;
  ans[make_pair(128, 9)] = 478771358;
  ans[make_pair(128, 10)] = 231881111;
  ans[make_pair(128, 11)] = 175889805;
  ans[make_pair(128, 12)] = 243630450;
  ans[make_pair(128, 13)] = 168908523;
  ans[make_pair(128, 14)] = 671961765;
  ans[make_pair(128, 15)] = 55761813;
  ans[make_pair(128, 16)] = 652682670;
  ans[make_pair(128, 17)] = 773939082;
  ans[make_pair(128, 18)] = 517628076;
  ans[make_pair(128, 19)] = 756201264;
  ans[make_pair(128, 20)] = 124604900;
  ans[make_pair(128, 21)] = 750976272;
  ans[make_pair(128, 22)] = 498253248;
  ans[make_pair(128, 23)] = 676047609;
  ans[make_pair(128, 24)] = 137170026;
  ans[make_pair(128, 25)] = 705610017;
  ans[make_pair(128, 26)] = 495032139;
  ans[make_pair(128, 27)] = 561797418;
  ans[make_pair(128, 28)] = 703097347;
  ans[make_pair(128, 29)] = 500815609;
  ans[make_pair(128, 30)] = 95984586;
  ans[make_pair(128, 31)] = 739707108;
  ans[make_pair(128, 32)] = 265613565;
  ans[make_pair(128, 33)] = 387099846;
  ans[make_pair(128, 34)] = 777331779;
  ans[make_pair(128, 35)] = 594676173;
  ans[make_pair(128, 36)] = 591219559;
  ans[make_pair(128, 37)] = 407997044;
  ans[make_pair(128, 38)] = 208947235;
  ans[make_pair(128, 39)] = 93337440;
  ans[make_pair(128, 40)] = 478908360;
  ans[make_pair(128, 41)] = 685013007;
  ans[make_pair(128, 42)] = 487033953;
  ans[make_pair(128, 43)] = 671903001;
  ans[make_pair(128, 44)] = 39521181;
  ans[make_pair(128, 45)] = 738490312;
  ans[make_pair(128, 46)] = 33785059;
  ans[make_pair(128, 47)] = 465470131;
  ans[make_pair(128, 48)] = 310453920;
  ans[make_pair(128, 49)] = 54648783;
  ans[make_pair(128, 50)] = 346831137;
  ans[make_pair(128, 51)] = 427694175;
  ans[make_pair(128, 52)] = 474743430;
  ans[make_pair(128, 53)] = 705296781;
  ans[make_pair(128, 54)] = 435828036;
  ans[make_pair(128, 55)] = 429824745;
  ans[make_pair(128, 56)] = 663532359;
  ans[make_pair(128, 57)] = 261388683;
  ans[make_pair(128, 58)] = 244690731;
  ans[make_pair(128, 59)] = 533997135;
  ans[make_pair(128, 60)] = 596108961;
  ans[make_pair(128, 61)] = 506813013;
  ans[make_pair(128, 62)] = 371892402;
  ans[make_pair(128, 63)] = 590145264;
  ans[make_pair(128, 64)] = 104733162;
  ans[make_pair(128, 65)] = 143420103;
  ans[make_pair(128, 66)] = 654339672;
  ans[make_pair(128, 67)] = 700348950;
  ans[make_pair(128, 68)] = 685038942;
  ans[make_pair(128, 69)] = 578826927;
  ans[make_pair(128, 70)] = 286484229;
  ans[make_pair(128, 71)] = 501639192;
  ans[make_pair(128, 72)] = 434962491;
  ans[make_pair(128, 73)] = 299270097;
  ans[make_pair(128, 74)] = 27702486;
  ans[make_pair(128, 75)] = 335375775;
  ans[make_pair(128, 76)] = 111746817;
  ans[make_pair(128, 77)] = 565603164;
  ans[make_pair(128, 78)] = 294926121;
  ans[make_pair(128, 79)] = 676063665;
  ans[make_pair(128, 80)] = 735862995;
  ans[make_pair(128, 81)] = 710035809;
  ans[make_pair(128, 82)] = 437011960;
  ans[make_pair(128, 83)] = 668528077;
  ans[make_pair(128, 84)] = 138765186;
  ans[make_pair(128, 85)] = 508213986;
  ans[make_pair(128, 86)] = 615036450;
  ans[make_pair(128, 87)] = 353784942;
  ans[make_pair(128, 88)] = 624827616;
  ans[make_pair(128, 89)] = 343900011;
  ans[make_pair(128, 90)] = 241289776;
  ans[make_pair(128, 91)] = 52410890;
  ans[make_pair(128, 92)] = 72018835;
  ans[make_pair(128, 93)] = 352406796;
  ans[make_pair(128, 94)] = 415705878;
  ans[make_pair(128, 95)] = 4802637;
  ans[make_pair(128, 96)] = 376367145;
  ans[make_pair(128, 97)] = 65589678;
  ans[make_pair(128, 98)] = 333633477;
  ans[make_pair(128, 99)] = 341834527;
  ans[make_pair(128, 100)] = 303717460;
  ans[make_pair(128, 101)] = 282387700;
  ans[make_pair(128, 102)] = 42951006;
  ans[make_pair(128, 103)] = 254706039;
  ans[make_pair(128, 104)] = 423048528;
  ans[make_pair(128, 105)] = 526429710;
  ans[make_pair(128, 106)] = 68131467;
  ans[make_pair(128, 107)] = 669954708;
  ans[make_pair(128, 108)] = 12787348;
  ans[make_pair(128, 109)] = 500636381;
  ans[make_pair(128, 110)] = 317959019;
  ans[make_pair(128, 111)] = 479433192;
  ans[make_pair(128, 112)] = 657133515;
  ans[make_pair(128, 113)] = 416259390;
  ans[make_pair(128, 114)] = 610216692;
  ans[make_pair(128, 115)] = 340129188;
  ans[make_pair(128, 116)] = 44594256;
  ans[make_pair(128, 117)] = 257373347;
  ans[make_pair(128, 118)] = 138718678;
  ans[make_pair(128, 119)] = 530767740;
  ans[make_pair(128, 120)] = 292922628;
  ans[make_pair(128, 121)] = 37220268;
  ans[make_pair(128, 122)] = 605295159;
  ans[make_pair(128, 123)] = 480722613;
  ans[make_pair(128, 124)] = 458170419;
  ans[make_pair(128, 125)] = 30540300;
  ans[make_pair(128, 126)] = 487159055;
  ans[make_pair(128, 127)] = 232966794;
  ans[make_pair(128, 128)] = 149150650;
  ans[make_pair(256, 1)] = 412133651;
  ans[make_pair(256, 2)] = 386543325;
  ans[make_pair(256, 3)] = 139952108;
  ans[make_pair(256, 4)] = 289303402;
  ans[make_pair(256, 5)] = 102404925;
  ans[make_pair(256, 6)] = 317067177;
  ans[make_pair(256, 7)] = 396414708;
  ans[make_pair(256, 8)] = 80515854;
  ans[make_pair(256, 9)] = 663739304;
  ans[make_pair(256, 10)] = 317300809;
  ans[make_pair(256, 11)] = 228877044;
  ans[make_pair(256, 12)] = 493725043;
  ans[make_pair(256, 13)] = 715317967;
  ans[make_pair(256, 14)] = 490300965;
  ans[make_pair(256, 15)] = 315527373;
  ans[make_pair(256, 16)] = 743539734;
  ans[make_pair(256, 17)] = 488329191;
  ans[make_pair(256, 18)] = 553627998;
  ans[make_pair(256, 19)] = 533025234;
  ans[make_pair(256, 20)] = 242583957;
  ans[make_pair(256, 21)] = 706116537;
  ans[make_pair(256, 22)] = 614109258;
  ans[make_pair(256, 23)] = 645447222;
  ans[make_pair(256, 24)] = 523195911;
  ans[make_pair(256, 25)] = 492109128;
  ans[make_pair(256, 26)] = 722623041;
  ans[make_pair(256, 27)] = 111085128;
  ans[make_pair(256, 28)] = 766395126;
  ans[make_pair(256, 29)] = 654378921;
  ans[make_pair(256, 30)] = 691964847;
  ans[make_pair(256, 31)] = 496688157;
  ans[make_pair(256, 32)] = 399056049;
  ans[make_pair(256, 33)] = 654363234;
  ans[make_pair(256, 34)] = 102052314;
  ans[make_pair(256, 35)] = 191720088;
  ans[make_pair(256, 36)] = 473910948;
  ans[make_pair(256, 37)] = 259736526;
  ans[make_pair(256, 38)] = 332840025;
  ans[make_pair(256, 39)] = 388047555;
  ans[make_pair(256, 40)] = 665791056;
  ans[make_pair(256, 41)] = 627111387;
  ans[make_pair(256, 42)] = 139696515;
  ans[make_pair(256, 43)] = 441456687;
  ans[make_pair(256, 44)] = 443032569;
  ans[make_pair(256, 45)] = 283264821;
  ans[make_pair(256, 46)] = 771641703;
  ans[make_pair(256, 47)] = 452641455;
  ans[make_pair(256, 48)] = 511306362;
  ans[make_pair(256, 49)] = 117572859;
  ans[make_pair(256, 50)] = 127701891;
  ans[make_pair(256, 51)] = 721298331;
  ans[make_pair(256, 52)] = 176520078;
  ans[make_pair(256, 53)] = 357242229;
  ans[make_pair(256, 54)] = 611296308;
  ans[make_pair(256, 55)] = 696994956;
  ans[make_pair(256, 56)] = 405628839;
  ans[make_pair(256, 57)] = 429224274;
  ans[make_pair(256, 58)] = 465336054;
  ans[make_pair(256, 59)] = 695091546;
  ans[make_pair(256, 60)] = 689828796;
  ans[make_pair(256, 61)] = 574648641;
  ans[make_pair(256, 62)] = 351220905;
  ans[make_pair(256, 63)] = 507964023;
  ans[make_pair(256, 64)] = 675326610;
  ans[make_pair(256, 65)] = 517248963;
  ans[make_pair(256, 66)] = 453528621;
  ans[make_pair(256, 67)] = 220301928;
  ans[make_pair(256, 68)] = 494463186;
  ans[make_pair(256, 69)] = 681789969;
  ans[make_pair(256, 70)] = 339589656;
  ans[make_pair(256, 71)] = 44524053;
  ans[make_pair(256, 72)] = 417125457;
  ans[make_pair(256, 73)] = 339589404;
  ans[make_pair(256, 74)] = 747135963;
  ans[make_pair(256, 75)] = 341780733;
  ans[make_pair(256, 76)] = 734158215;
  ans[make_pair(256, 77)] = 396817281;
  ans[make_pair(256, 78)] = 21997836;
  ans[make_pair(256, 79)] = 5728464;
  ans[make_pair(256, 80)] = 147611205;
  ans[make_pair(256, 81)] = 456248898;
  ans[make_pair(256, 82)] = 714128667;
  ans[make_pair(256, 83)] = 377654949;
  ans[make_pair(256, 84)] = 3862068;
  ans[make_pair(256, 85)] = 128418948;
  ans[make_pair(256, 86)] = 589390074;
  ans[make_pair(256, 87)] = 304947090;
  ans[make_pair(256, 88)] = 11703825;
  ans[make_pair(256, 89)] = 228266073;
  ans[make_pair(256, 90)] = 127304142;
  ans[make_pair(256, 91)] = 429215724;
  ans[make_pair(256, 92)] = 361541124;
  ans[make_pair(256, 93)] = 521572968;
  ans[make_pair(256, 94)] = 468358191;
  ans[make_pair(256, 95)] = 341231688;
  ans[make_pair(256, 96)] = 65323503;
  ans[make_pair(256, 97)] = 613778508;
  ans[make_pair(256, 98)] = 15985323;
  ans[make_pair(256, 99)] = 291661029;
  ans[make_pair(256, 100)] = 410970006;
  ans[make_pair(256, 101)] = 591638112;
  ans[make_pair(256, 102)] = 349541550;
  ans[make_pair(256, 103)] = 89967528;
  ans[make_pair(256, 104)] = 224922159;
  ans[make_pair(256, 105)] = 361094166;
  ans[make_pair(256, 106)] = 584206074;
  ans[make_pair(256, 107)] = 640051812;
  ans[make_pair(256, 108)] = 324264456;
  ans[make_pair(256, 109)] = 652625388;
  ans[make_pair(256, 110)] = 693768537;
  ans[make_pair(256, 111)] = 11740617;
  ans[make_pair(256, 112)] = 309238398;
  ans[make_pair(256, 113)] = 211085469;
  ans[make_pair(256, 114)] = 194905872;
  ans[make_pair(256, 115)] = 639416484;
  ans[make_pair(256, 116)] = 110110707;
  ans[make_pair(256, 117)] = 296645895;
  ans[make_pair(256, 118)] = 748118511;
  ans[make_pair(256, 119)] = 131177718;
  ans[make_pair(256, 120)] = 511142751;
  ans[make_pair(256, 121)] = 775975599;
  ans[make_pair(256, 122)] = 421403409;
  ans[make_pair(256, 123)] = 475528473;
  ans[make_pair(256, 124)] = 434685258;
  ans[make_pair(256, 125)] = 1768977;
  ans[make_pair(256, 126)] = 80301375;
  ans[make_pair(256, 127)] = 708023862;
  ans[make_pair(256, 128)] = 569195676;
  ans[make_pair(256, 129)] = 56238084;
  ans[make_pair(256, 130)] = 632887668;
  ans[make_pair(256, 131)] = 88089750;
  ans[make_pair(256, 132)] = 631539342;
  ans[make_pair(256, 133)] = 396695565;
  ans[make_pair(256, 134)] = 38780154;
  ans[make_pair(256, 135)] = 695798271;
  ans[make_pair(256, 136)] = 469819224;
  ans[make_pair(256, 137)] = 439587099;
  ans[make_pair(256, 138)] = 69045921;
  ans[make_pair(256, 139)] = 682966116;
  ans[make_pair(256, 140)] = 112310856;
  ans[make_pair(256, 141)] = 64943298;
  ans[make_pair(256, 142)] = 534475872;
  ans[make_pair(256, 143)] = 40215357;
  ans[make_pair(256, 144)] = 389728458;
  ans[make_pair(256, 145)] = 286368453;
  ans[make_pair(256, 146)] = 736006257;
  ans[make_pair(256, 147)] = 501181650;
  ans[make_pair(256, 148)] = 54829908;
  ans[make_pair(256, 149)] = 603489402;
  ans[make_pair(256, 150)] = 338032656;
  ans[make_pair(256, 151)] = 512182818;
  ans[make_pair(256, 152)] = 627500097;
  ans[make_pair(256, 153)] = 462674016;
  ans[make_pair(256, 154)] = 3103092;
  ans[make_pair(256, 155)] = 157324491;
  ans[make_pair(256, 156)] = 43978329;
  ans[make_pair(256, 157)] = 596818971;
  ans[make_pair(256, 158)] = 259025598;
  ans[make_pair(256, 159)] = 9088632;
  ans[make_pair(256, 160)] = 91991781;
  ans[make_pair(256, 161)] = 577291428;
  ans[make_pair(256, 162)] = 211245489;
  ans[make_pair(256, 163)] = 429471231;
  ans[make_pair(256, 164)] = 142626330;
  ans[make_pair(256, 165)] = 172560633;
  ans[make_pair(256, 166)] = 510907446;
  ans[make_pair(256, 167)] = 444609585;
  ans[make_pair(256, 168)] = 758102058;
  ans[make_pair(256, 169)] = 375112647;
  ans[make_pair(256, 170)] = 744786693;
  ans[make_pair(256, 171)] = 276174402;
  ans[make_pair(256, 172)] = 19259856;
  ans[make_pair(256, 173)] = 233672418;
  ans[make_pair(256, 174)] = 745389414;
  ans[make_pair(256, 175)] = 225772848;
  ans[make_pair(256, 176)] = 23385663;
  ans[make_pair(256, 177)] = 324290610;
  ans[make_pair(256, 178)] = 519804558;
  ans[make_pair(256, 179)] = 120337812;
  ans[make_pair(256, 180)] = 402578568;
  ans[make_pair(256, 181)] = 360676008;
  ans[make_pair(256, 182)] = 450089262;
  ans[make_pair(256, 183)] = 551043738;
  ans[make_pair(256, 184)] = 337388940;
  ans[make_pair(256, 185)] = 512108856;
  ans[make_pair(256, 186)] = 28879011;
  ans[make_pair(256, 187)] = 690040638;
  ans[make_pair(256, 188)] = 106017282;
  ans[make_pair(256, 189)] = 558262341;
  ans[make_pair(256, 190)] = 99972432;
  ans[make_pair(256, 191)] = 608226003;
  ans[make_pair(256, 192)] = 612152037;
  ans[make_pair(256, 193)] = 42414435;
  ans[make_pair(256, 194)] = 776201013;
  ans[make_pair(256, 195)] = 39580443;
  ans[make_pair(256, 196)] = 518796945;
  ans[make_pair(256, 197)] = 494437752;
  ans[make_pair(256, 198)] = 583194366;
  ans[make_pair(256, 199)] = 723936555;
  ans[make_pair(256, 200)] = 415359657;
  ans[make_pair(256, 201)] = 309569589;
  ans[make_pair(256, 202)] = 751104774;
  ans[make_pair(256, 203)] = 166684527;
  ans[make_pair(256, 204)] = 249229170;
  ans[make_pair(256, 205)] = 353120823;
  ans[make_pair(256, 206)] = 130668327;
  ans[make_pair(256, 207)] = 753823584;
  ans[make_pair(256, 208)] = 580966092;
  ans[make_pair(256, 209)] = 561963717;
  ans[make_pair(256, 210)] = 543672234;
  ans[make_pair(256, 211)] = 393846327;
  ans[make_pair(256, 212)] = 586278000;
  ans[make_pair(256, 213)] = 327398400;
  ans[make_pair(256, 214)] = 278403867;
  ans[make_pair(256, 215)] = 156455586;
  ans[make_pair(256, 216)] = 363920382;
  ans[make_pair(256, 217)] = 190245195;
  ans[make_pair(256, 218)] = 290039148;
  ans[make_pair(256, 219)] = 547014447;
  ans[make_pair(256, 220)] = 466218648;
  ans[make_pair(256, 221)] = 146037150;
  ans[make_pair(256, 222)] = 585462906;
  ans[make_pair(256, 223)] = 666008595;
  ans[make_pair(256, 224)] = 691786683;
  ans[make_pair(256, 225)] = 374707494;
  ans[make_pair(256, 226)] = 622498779;
  ans[make_pair(256, 227)] = 231158277;
  ans[make_pair(256, 228)] = 685740951;
  ans[make_pair(256, 229)] = 115612245;
  ans[make_pair(256, 230)] = 681825249;
  ans[make_pair(256, 231)] = 545555745;
  ans[make_pair(256, 232)] = 551718468;
  ans[make_pair(256, 233)] = 277206615;
  ans[make_pair(256, 234)] = 640171035;
  ans[make_pair(256, 235)] = 757727334;
  ans[make_pair(256, 236)] = 195193908;
  ans[make_pair(256, 237)] = 658656684;
  ans[make_pair(256, 238)] = 457760646;
  ans[make_pair(256, 239)] = 225925875;
  ans[make_pair(256, 240)] = 505761984;
  ans[make_pair(256, 241)] = 18685233;
  ans[make_pair(256, 242)] = 506832921;
  ans[make_pair(256, 243)] = 112511021;
  ans[make_pair(256, 244)] = 396846646;
  ans[make_pair(256, 245)] = 290147622;
  ans[make_pair(256, 246)] = 113924623;
  ans[make_pair(256, 247)] = 669986155;
  ans[make_pair(256, 248)] = 336008070;
  ans[make_pair(256, 249)] = 63611061;
  ans[make_pair(256, 250)] = 238586775;
  ans[make_pair(256, 251)] = 119956662;
  ans[make_pair(256, 252)] = 616557739;
  ans[make_pair(256, 253)] = 772784623;
  ans[make_pair(256, 254)] = 334527774;
  ans[make_pair(256, 255)] = 410403148;
  ans[make_pair(256, 256)] = 51933421;
  printf("%d\n", ans[make_pair(N, K)]);
  ;
}
