16 {1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4},
17 {5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8},
18 {9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12},
19 {13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16},
20 {17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20},
21 {21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24},
22 {25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28},
23 {29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32},
24 {33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36},
25 {37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40},
26 {41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44},
27 {45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48},
28 {49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52},
29 {53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56},
30 {57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60},
31 {61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64},
32 {65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68},
33 {69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72},
34 {4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1},
35 {8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5},
36 {12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9},
37 {16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13},
38 {20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17},
39 {24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21},
40 {28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25},
41 {32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29},
42 {36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33},
43 {40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37},
44 {44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41},
45 {48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45},
46 {52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49},
47 {56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53},
48 {60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57},
49 {64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61},
50 {68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65},
51 {72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69}
54 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
55 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
56 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
57 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
58 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
59 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
60 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
61 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
62 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
63 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
64 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
65 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
66 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
67 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
68 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
69 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
70 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
71 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
72 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
73 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
74 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
75 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
76 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
77 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
78 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
79 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
80 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
81 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
82 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
83 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
84 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
85 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
86 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
87 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
88 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
89 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17}
91 int ixx[18][41][3] = {
92 {{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{19,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
93 {{16,0,0},{17,0,0},{18,17,0},{16,0,0},{17,0,0},{18,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{12,20,19},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
94 {{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,13,0},{13,0,0},{14,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
95 {{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,8,0},{8,0,0},{7,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
96 {{5,0,0},{4,0,0},{3,4,0},{5,0,0},{4,0,0},{3,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{9,1,2},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
97 {{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{2,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
98 {{8,0,0},{8,0,0},{7,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{3,2,9},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{5,4,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{5,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{9,0,0},{9,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
99 {{8,0,0},{8,0,0},{8,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{13,0,0},{13,0,0},{13,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0}},
100 {{13,0,0},{13,0,0},{14,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{18,19,12},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{16,17,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{16,0,0},{14,0,0},{14,0,0},{15,0,0},{15,0,0},{12,0,0},{12,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
101 {{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{19,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
102 {{16,0,0},{17,0,0},{18,17,0},{16,0,0},{17,0,0},{18,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{12,20,19},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
103 {{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,13,0},{13,0,0},{14,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
104 {{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,8,0},{8,0,0},{7,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
105 {{5,0,0},{4,0,0},{3,4,0},{5,0,0},{4,0,0},{3,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{9,1,2},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
106 {{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{2,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
107 {{8,0,0},{8,0,0},{7,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{3,2,9},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{5,4,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{5,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{9,0,0},{9,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
108 {{13,0,0},{13,0,0},{13,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{8,0,0},{8,0,0},{8,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0}},
109 {{13,0,0},{13,0,0},{14,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{18,19,12},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{16,17,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{16,0,0},{14,0,0},{14,0,0},{15,0,0},{15,0,0},{12,0,0},{12,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
112 {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
113 {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
114 {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
115 {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
116 {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
117 {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
118 {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
119 {{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0}},
120 {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
121 {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
122 {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
123 {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
124 {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
125 {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
126 {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
127 {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
128 {{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0}},
129 {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
133 : m_name(ps.getUntrackedParameter<std::string>(
"name",
"EcalDAQHandler")) {
135 std::cout <<
"EcalDAQ Source handler constructor\n" << std::endl;
154 uint16_t hv_off_dbstatus = ( dbStatus & (1 <<
pos ) ) ;
155 if(hv_off_dbstatus>0) hv_off_dbstatus=1;
156 return hv_off_dbstatus;
162 std::cout <<
"------- Ecal DAQ - > getNewObjects\n";
164 std::ostringstream ss;
167 unsigned long long max_since = 1;
170 max_since = tagInfo().lastInterval.first;
173 std::cout <<
" max_since : " << max_since << std::endl;
176 Ref daq_db = lastPayload();
177 std::cout <<
"retrieved last payload " << std::endl;
183 uint16_t oldEBStatus[72][17][2];
184 uint16_t newEBStatus[72][17][2];
185 uint16_t oldEEStatus[20][20][2];
186 uint16_t newEEStatus[20][20][2];
188 for(
int k = 0 ;
k < 2;
k++ ) {
190 for(
int iphi = 1 ; iphi < 73; iphi++) {
191 for(
int ieta = 1 ; ieta < 18; ieta++) {
195 uint16_t dbStatus = 0;
196 dbStatus =(daq_db->barrel( ebid.
hashedIndex())).getStatusCode();
197 oldEBStatus[iphi - 1][ieta -1][
k] = dbStatus;
200 if ( it != daq_db->end() ) {
202 std::cout<<
"*** error channel not found: eta/phi ="<< ieta <<
"/" << iphi << std::endl;
204 daq_temp->
setValue( ebid, dbStatus );
205 if(dbStatus != 0)
std::cout <<
"barrel side " <<
k <<
" phi " << iphi <<
" eta " << ieta <<
" status " << dbStatus << std::endl;
211 for(
int ix = 1 ; ix < 21; ix++) {
212 for(
int iy = 1 ; iy < 21; iy++) {
218 uint16_t dbStatus = 0;
219 if ( it != daq_db->end() ) {
220 dbStatus = it->getStatusCode();
222 oldEEStatus[ix - 1][iy -1][
k] = dbStatus;
223 daq_temp->
setValue( eeid, dbStatus );
224 if(dbStatus != 0)
std::cout <<
"endcap side " <<
k <<
" x " << ix <<
" y " << iy <<
" status " << dbStatus << std::endl;
233 std::cout <<
"Retrieving DAQ status from OMDS DB ... " << std::endl;
235 std::cout <<
"Connection done" << std::endl;
238 std::cout <<
" Problem with OMDS: connection parameters " << m_sid <<
"/" << m_user <<
"/" << m_pass << std::endl;
256 if(m_firstRun < (
unsigned long)max_since) {
257 min_run= (int)max_since+1;
259 else { min_run=(int)m_firstRun; }
260 int max_run=(int)m_lastRun;
261 std::cout <<
"min_run " << min_run <<
" max_run " << max_run << std::endl;
264 my_list = econn->fetchRunListByLocation(my_runtag, min_run, max_run, my_locdef);
266 std::vector<RunIOV> run_vec = my_list.
getRuns();
267 int num_runs = run_vec.size();
269 std::cout <<
" number of runs is : " << num_runs << std::endl;
271 unsigned long irun=0;
280 int krmax =
std::min(num_runs, 1000);
281 for(
int kr = 0; kr < krmax; kr++){
282 if(m_to_transfer.size() < 20 ) {
284 if(run_vec[kr].getRunTag().getGeneralTag() !=
"GLOBAL")
continue;
285 bool somediff =
false;
287 if(kr == 0) debug =
true;
289 irun = (
unsigned long) run_vec[kr].getRunNumber();
290 for(
int k = 0 ;
k < 2;
k++ ) {
291 for(
int iphi = 0 ; iphi < 72; iphi++) {
292 for(
int ieta = 0 ; ieta < 17; ieta++) {
293 newEBStatus[iphi][ieta][
k] = 0;
296 for(
int ix = 0 ; ix < 20; ix++) {
297 for(
int iy = 0 ; iy < 20; iy++) {
298 newEEStatus[ix][iy][
k] = 0;
306 std::map<EcalLogicID, RunDat> fed_dat;
307 econn->fetchDataSet(&fed_dat, &run_vec[kr]);
310 typedef std::map<EcalLogicID, RunDat>::const_iterator fedIter;
315 std::map<EcalLogicID, RunFEConfigDat> feconfig;
316 econn->fetchDataSet(&feconfig, &run_vec[kr]);
318 if(fed_dat.size() == 0 || feconfig.size() == 0) {
319 std::cout <<
" run " << irun <<
" tag " << run_vec[kr].getRunTag().getGeneralTag()
320 <<
" Run type " << run_vec[kr].getRunTag().getRunTypeDef().getRunType()
321 <<
" feconfig and/or read FED size = 0, leaving..." << std::endl;
326 if(fed_dat.size() != 54 ) {
328 int SM[36] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
330 int Sect[2][9] = {{0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0}};
331 for (fedIter
p=fed_dat.begin();
p!=fed_dat.end();
p++) {
346 Sect[izz][sm - 1] = 1;
356 for(
int sm = 0; sm < 36; sm++)
360 for(
int tt = 0; tt < 68; tt++)
361 newEBStatus[
iphiEB[sm][tt] - 1][
ietaEB[sm][tt] - 1][0] = 1;
363 for(
int tt = 0; tt < 68; tt++)
364 newEBStatus[
iphiEB[sm - 18][tt] - 1][
ietaEB[sm - 18][tt] - 1][1] = 1;
366 for(
int z = 0;
z < 2;
z++)
367 for(
int sec = 0; sec < 9; sec++)
368 if(Sect[
z][sec] != 1) {
371 if(
z == 1) sec18 = sec + 9;
372 for(
int sc = 0 ; sc < 41; sc++) {
373 if(
ixx[sec18][sc][0] != 0) {
374 newEEStatus[
ixx[sec18][sc][0] - 1][
iyy[sec18][sc][0] - 1][
z] = 1;
375 if(
ixx[sec18][sc][1] != 0) {
376 newEEStatus[
ixx[sec18][sc][1] - 1][iyy[sec18][sc][1] - 1][
z] = 1;
377 if(
ixx[sec18][sc][2] != 0) {
378 newEEStatus[
ixx[sec18][sc][2] - 1][iyy[sec18][sc][2] - 1][
z] = 1;
386 typedef std::map<EcalLogicID, RunFEConfigDat>::const_iterator feConfIter;
391 for (feConfIter
p=feconfig.begin();
p!=feconfig.end();
p++) {
399 myconfig.
setId(fe_conf_id);
400 econn->fetchConfigSet(&myconfig);
405 std::vector< ODBadTTDat > badTT_dat;
416 econn->fetchConfigSet(&mybadTT);
418 econn->fetchConfigDataSet(&badTT_dat, &mybadTT);
419 NbadTT = badTT_dat.size();
430 for(
size_t iTT = 0; iTT < NbadTT; iTT++){
431 int fed_id = badTT_dat[iTT].getFedId();
432 int tt_id = badTT_dat[iTT].getTTId();
438 if(fed_id >= 610 && fed_id <= 645) {
443 if(fed_id > 627) side = +1;
445 <<
" eta " <<
ietaEB[fed_id - 610][tt_id - 1]
446 <<
" side " << side << std::endl;
447 newEBStatus[
iphiEB[fed_id - 610][tt_id - 1] - 1][
ietaEB[fed_id - 610][tt_id - 1] - 1][side] = 1;
449 else if(fed_id <= 609 || (fed_id >= 646 && fed_id <= 654)) {
455 if(debug)
std::cout <<
" x " <<
ixx[fed_id - 601][tt_id - 1][0]
456 <<
" y " <<
iyy[fed_id - 601][tt_id - 1][0];
457 newEEStatus[
ixx[fed_id - 601][tt_id - 1][0] - 1][iyy[fed_id - 601][tt_id - 1][0] - 1][side] = 1;
458 if(
ixx[fed_id - 601][tt_id - 1][1] != 0) {
459 if(debug)
std::cout <<
" x2 " <<
ixx[fed_id - 601][tt_id - 1][1]
460 <<
" y2 " << iyy[fed_id - 601][tt_id - 1][1];
461 newEEStatus[
ixx[fed_id - 601][tt_id - 1][1] - 1][iyy[fed_id - 601][tt_id - 1][1] - 1][side] = 1;
462 if(
ixx[fed_id - 601][tt_id - 1][2] != 0) {
463 if(debug)
std::cout <<
" x3 " <<
ixx[fed_id - 601][tt_id - 1][2]
464 <<
" y3 " << iyy[fed_id - 601][tt_id - 1][2];
465 newEEStatus[
ixx[fed_id - 601][tt_id - 1][2] - 1][iyy[fed_id - 601][tt_id - 1][2] - 1][side] = 1;
468 if(debug)
std::cout <<
" side " << side << std::endl;
472 if(debug)
std::cout <<
" x " <<
ixx[fed_id - 637][tt_id - 1][0]
473 <<
" y " <<
iyy[fed_id - 637][tt_id - 1][0];
474 newEEStatus[
ixx[fed_id - 637][tt_id - 1][0] - 1][iyy[fed_id - 637][tt_id - 1][0] - 1][side] = 1;
475 if(
ixx[fed_id - 637][tt_id - 1][1] != 0) {
476 if(debug)
std::cout <<
" x2 " <<
ixx[fed_id - 637][tt_id - 1][1]
477 <<
" y2 " << iyy[fed_id - 637][tt_id - 1][1];
478 newEEStatus[
ixx[fed_id - 637][tt_id - 1][1] - 1][iyy[fed_id - 637][tt_id - 1][1] - 1][side] = 1;
479 if(
ixx[fed_id - 637][tt_id - 1][2] != 0) {
480 if(debug)
std::cout <<
" x3 " <<
ixx[fed_id - 637][tt_id - 1][2]
481 <<
" y3 " << iyy[fed_id - 637][tt_id - 1][2];
482 newEEStatus[
ixx[fed_id - 637][tt_id - 1][2] - 1][iyy[fed_id - 637][tt_id - 1][2] - 1][side] = 1;
485 if(debug)
std::cout <<
" side " << side << std::endl;
489 std::cout <<
" Strange Fed " << fed_id <<
" TT/SC " << tt_id <<
" Give up " << std::endl;
495 for(
int k = 0 ;
k < 2;
k++ ) {
498 if(debug)
std::cout <<
" Side : " <<
k <<
" barrel " << std::endl;
499 for(
int iphi = 0 ; iphi < 72; iphi++) {
500 for(
int ieta = 0 ; ieta < 17; ieta++) {
501 if(newEBStatus[iphi][ieta][
k] != oldEBStatus[iphi][ieta][
k]) {
504 daq_temp->
setValue( ebid, newEBStatus[iphi][ieta][k]);
505 if(debug)
std::cout <<
" change in EB side " << iz <<
" phi " << iphi +1 <<
" eta " << ieta + 1 << std::endl;
507 if(debug)
std::cout << newEBStatus[iphi][ieta][
k] <<
" " ;
508 oldEBStatus[iphi][ieta][
k] = newEBStatus[iphi][ieta][
k];
512 if(debug)
std::cout <<
" endcaps " << std::endl;
513 for(
int iy = 0 ; iy < 20; iy++) {
514 for(
int ix = 0 ; ix < 20; ix++) {
516 if(newEEStatus[ix][iy][
k] != oldEEStatus[ix][iy][
k]) {
519 daq_temp->
setValue( eeid, newEEStatus[ix][iy][k]);
520 if(debug)
std::cout <<
" change in EE side " << iz <<
" x " << ix +1 <<
" y " << iy + 1 << std::endl;
522 if(debug)
std::cout << newEEStatus[ix][iy][
k] <<
" " ;
523 oldEEStatus[ix][iy][
k] = newEEStatus[ix][iy][
k];
541 for(
int k = 0 ;
k < 2;
k++ ) {
543 for(
int iphi = 1 ; iphi < 73; iphi++) {
544 for(
int ieta = 1 ; ieta < 18; ieta++) {
547 uint16_t dbStatus = 0;
549 daq_pop->
setValue( ebid, dbStatus );
555 for(
int ix = 1 ; ix < 21; ix++) {
556 for(
int iy = 1 ; iy < 21; iy++) {
561 uint16_t dbStatus = 0;
562 if ( it != daq_temp->
end() ) {
563 dbStatus = it->getStatusCode();
565 daq_pop->
setValue( eeid, dbStatus );
573 std::cout <<
"Generating popcon record for run "<< irun << std::endl;
577 ss <<
"Run=" << irun <<
"_DAQchanged_"<<std::endl;
578 m_userTextLog = ss.str()+
";";
582 std::cout<<
"Run DAQ record was the same as previous run " << std::endl;
583 ss <<
"Run=" << irun <<
"_DAQunchanged_"<<std::endl;
584 m_userTextLog = ss.str()+
";";
595 std::cout <<
"Ecal - > end of getNewObjects -----------\n";
EcalDAQTowerStatusMap EcalDAQTowerStatus
static bool validDetId(int ix, int iy, int iz)
T getParameter(std::string const &) const
std::vector< RunIOV > getRuns()
EcalDAQHandler(edm::ParameterSet const &)
edm::Ref< Container > Ref
const_iterator end() const
void setLocationDef(const LocationDef locDef)
int hashedIndex() const
get a compact index for arrays [TODO: NEEDS WORK]
void setValue(const uint32_t id, const Item &item)
const_iterator find(uint32_t rawId) const
uint32_t rawId() const
get the raw id
void setRunTypeDef(const RunTypeDef runTypeDef)
void setRunType(std::string runtype)
const Item & barrel(size_t hashedIndex) const
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
uint16_t OffDBStatus(uint16_t dbStatus, int pos)
void setLocation(std::string loc)
std::vector< Item >::const_iterator const_iterator
void setGeneralTag(std::string tag)