1010110111010001101000110110011010110010111001100101000100010000011100101011101101111010000010100001001000001000101011100111001010001010000000110001101011000110001101010110000100111111100110011111110011110011011111010110000010111001100101011101011101110101001111000000101101110101000110011101000011001100101000000100111100111010010101111110010100111101000100010110111101011001011111101001011111011010 1101100011011000011011111011001011010001000011011000000010111011011011101010110001010100000111010011010000111010010000100001101100110100000000011011010110100101010100000101100000111111011111010000010000000011001011111000111000100100000101011011101010101100111000111000001000111000100111010110010100010110000011001001000101001101110110100101010011010111110101100101001000011000100100111111100000100101 0010010100110111111000101010100111000110001011000000011000110100111111111000010111011000010001111010001010000110111000010010001111100101110001110111011110111010100110100111100000111101111100000011010000100111011110001101110011110010100111011101101011110101101111111001111111101100101011110110111010001100010111111111001110100000000100110100110001100110111101010011101111000001111011100010001011001101 0111000110101011100000101101011101000001111111100011001110001001011100011101101100011110011001000111111101010110100101010101000101100110001100000101111110011000110101111010000010000011010100010101001101010100000010101100010001010111011100111111111010100111110000001001000110011110011111110011100001011001001100100001100010111000100011100000100001001010111100000000000100001011110001101001001000111110 1010110101110011101001011110001111011101011011100101100010101010100100000100110100111011100001011001111011000111111011100100001100111011010101101001000101011011010101100110011111010001110101110000001110001111111110110001101101101110100010010110111110111001001011110100011110001111000101010111100101111001111011011001111000101101010010010001111000110000001101100010100100001100111110001100001111010111 1100111100110110111110110110001001011101100011011001101110000010111110101001001001110010001100011000011111101111101010101001110010111111111001110001011010101100111000000000011110100001101101110111111000100010010101010011011011100101110100000101011110000110011000101011011110110100111000011011110001100110111010100110011001000010000111101101001000100110111110010011100010111101110101110110000101010111 0000011101111010100111001011110011011001010001000000011011011000100110100100001101100001011001011000111000101110110000000010010101111010000000000110101010111100010001001010010010010011101011010111100000111100000000100000111111110100101001100011101000000111110000111100001001110110001000011110101001111100011111001111100010001011011111001001100111011010001100100111010100101010011110110111111010101010 0111101101001000110110100111100111001110001110010010000100000101001011011101010110100101010001010110000000100011100000101110111101010001011011111011001101100110001100110000101001111101011001000010111011100110000011110011011111110001110101111110111111111110011010010011101110011011110110100000101001010111101111011100111110010111100101010100000100000111000010101111010110011111101111100101011100100011 0111110101010010101110010000111010101001100101100101100110010001010010110011000011011100111001101110011011000111110111101000110010110011000111011100000011110111110010001010001001001011101100111001111111010110111101100000100111000101110000001001011000000011011110001010000010010100101000011000101110001001010100110010010001101010100011110101110111010100100100011010011010010110110100100100110111010101 0010100111111100111011011010111001011100111111110010100010010000011100111100101100010111010011000101100111011001111110000000001011010000011110001011100000101110011101111010110101111110101111101010111000100010010110010111101001110000110010001010011100111100011101100101110100110100101001010000000111101001000100010110010010010000000100000001111110010001111011100111000000110011100100000001011110010101 0001001011010011011011010101000011110010001001110110010111010011010101110001110001010011101110001000110011001010111110111110010001111011110100001111101101111111011010111011011001111101111110101110000011110111110110010001010100101110000011100011100101000110100011000001111011001100011111001001010100001111010010000011111101010111111100110101100110000000101001110111111101000010001001110010110111111011 0000001010101011111011001000000100111001110010010111101111111100011000011010011010101010011011011110000011001010001100110110010011001110011001110111000101101110001010011001111110000110111011001110111101000010011010101011111101011100000111000110101011000110011111111001100011000111000111110100111111100000100100100011110001001110100100001111010001011100101111111000111100101100101011010011000001110100 1100100001100010000111110111110010000110000011001100110111110000100001000010001010010110001000101111011010110111000100000000001101101001101110010000011000001110011111001010000101011010010001100010110110101100011111110000000011010100010001110111001000000111001101000001001101000000100100001101001110101011101110100001000000111010000111101010111011010010010100101100110011000011011111110100001001011011 0111111110010000010011110100100101011111011010110101000101110110110011010001011010001111111010111101011111100111110111000111011111111001100100010000101001001100000010010010110010111111010101001011010011110101110101100100100111000000011001110010100000011010001001010001110111011000001010110111111001010001011011000111111011101100110001001100010010011011101000011011110000000101101111000101001101100001 1110110110101101101001000110000000000100110011000001010010111111001110110011101000100011010010011001101011110010110100000110110000000110110001100001100011010101110100100010011101010100010100110010000101010111010010011101011001000111000101010100101110101110000010011100001000111001111010100100000111010110011100011011101110110111110111111010111111100100100010011011110101010001110111001110000101010100 1011101000111111010000010111111000011001111000000110111100001010011001010001001101100000111000010111001011010111110110100010111100110110011111111010001011000110011100011001000111111101011101100101111100000000000001000100110000110101000010010110110110001111000101101000111101000110000011000111010111110100111110110010110101101001101000000000110001010111000111110100100100000001110010101110010001000101 0100010011001010011101100110000100101011000101110110011111010010100101001111010000001110011010100110111100110000001010000110000100001110000010011001101100001011001110111001101101110000001110111101100111011001000010001101100010100101111111000011000000000011110001011110000000111011011110001001101100001010010010010101000000000110111100111001110011111101100011010100110000110000010110100010010100101110 1100011111100000101011001111001101001110100000010001100101100000000011110101011001011110110000110001111111100110110111011110100010101011001000011011010011000100111111010011010010101010100111011100101000011100010111111010010100111110001100101010110000101100001111100100110100010010101100001110100010111011101100010110010110110101011110001110110011000110011100101100000000011100111110011000100101010011 0010010000110100011111101101000001010111010111111011100100011111011110011101001001011001001110100011000000001011010101011111001101001001001011110111111011111011100110000001101000101000001100100010110110111100101001101011011101111001100101000110110010011000110011000110111011000001100110001000110010101001111011101010010101100011011011111110111110000100010010010111011010100100110001010011101010101110 0010110101110010011001110101001111000101100101110010100110000010110001111110000010101111100010011101101011010010001111001110101001001110100111111001001111001110000010011011111100100001100000011101000000100001011010010010000110110110000101110111111000010001101110111100011011001011010010101111001100110001000110000111111111000111110010011100111110101001110010110101111101101101000010100000111010101001 1101011110001111100111111111110101100010001011000000110100010001100000101101011110000110001001001011100110100000110000011110010010100101011010011110101110001001001100110000111111001110000101001000000001101001000110110010000110011000111101010111100110001111000100010100000001001101101111001010100101110001001111001101000100001111110001011000110110000010000111111110011101110010011011000100001011111011 0100100010100111000110001101110101111011010110000001001000111111100011010100111101100100110101101111001100110101111111001001000010110010001010011000011110001100011101101011100010100001010101110100010010000100110110101011111000010111101101010101000101100000101110010111011100011110011100000000001100100111110110101000000001110101111000101011100101001111010000010001010111110001101000100001000110100001 1100010011111101101010010011101101011101101110001111000001001010010001111001101001000010100001100001000011110000001100011100000011100111001001110000000111000110011000111111001010111101110000011101101111111010010011111101101111100001001100000001011110001000001101101001000110101111011111010001111101001001011000111100111111110101100000000100100000101011010000110001111100010001101101111010001000001010 0000101010010001100101010100010100100100001011001101101100001000010100100010010000000011101111110110011101101110001011011101100100010010111110011011101011011010010011110011011000001011000111111000111110000011110001111000001101000011100011010101010101111010111101101110101001010100101000101010011100000011111001110100001101001011111011000011000001011101010001011100011011111000100100011100001000110110 1110111101111110010000110100111110011011110100111110111011010100010010001000111111001011100100011011010110110000111111110110001011010010111101010000110101001011000100001001000111000010001101010101011110011111100011000101111001011110101011010100000011010111000100000001100111101000001101111001010010110111010101011100011111000001011001010100011111111001010100110010011001111111000101101110011010011100 0001101011101000001010100111111011110000100011101100010101000011111001001011001110001111000100111101111000111001101001111110011010010111011010111101101101100001111011011011101111100001011011001010100001001111010111100100101110011010111000000011011100001010100011001001011111001001111110111111110001111010001011011101101010000010000001000011101010101100000101111010000010100001001101111101000100011001 0101111001011001011011011111011010000010111110110100001101000111010101001011100000100001010110100111011100100110100000000011000000100101110111001110010011111000111111001111100110110000100100101010110100100011000101111101011100101101001001010011110100101110011010011110010011010110011000110010000110100001111000010111110000110000001000101010111010101110001100111001000000000011010011001010001100000011 1011110110011001101010010110001011100111111111101001011101100001111000111100010010000000001100000101111111110010110000101111100010110010100110111000101101000111011100000111111101011011010011101110001011110101111000100111001001111111110001101010000011010101100101101101110001100100101000101000010101110110111100011100001100100110111101100011110111101000011100011011101010001101000110000101001101111010 1100001110110011010101011001010111110000101010001100101101101001101001111101000110011011101010101011101000010111011011000110011000001110000011001100110001111100010100100100010100001110100001111001100011101011111111010011100111101001110100101100011100000001111111011101001110110000010110001100000100000001101100100100000001100010110111011010111001011000000111011001001001110110111001010010100001001110 1100010011101111010001111011000010010100100101001010000011100001100000000011101101001001000101010100101101001011110011111100111100100101101111000001110101101011101111110000100010001110000001001101001001111100010000110101001010010000101010111011010011000111011111101110000110101100111001111000011000001100101111010101010000000100010011000001110100011010011110111000000011110010100100100011110110100000 0110010110100010011111100010100100001000110101111111011110111101101111001100100111011011111000001111010100001000110101101101000110011100111001010100101110110011101100111110100001110110011101000011011101100000011110100101011001010111001111011001110111100111101010100000011111101011010011000111101011000100010100100101000010010000010101101000001001011100101110110100110001000011110001101010011010100010 1100001111000010010110011101110101000110001111101001000110110000000001001010111001111011100111110001110111100110001100001001110110001010000101100011101101100011000001011000101101111011001000111100011111111001100100001001110101011100110101000011010110110000100111101101000110010101111010010011000101011000110101011101111101000000000011001100001001010101100011000100010100000111110010100101111101000011 1010000101101110110110001101001100010000110011110010100100111010101000011010101110100000101101100000011000111000010011110010001111010011011010110000111101010000100100011000010011110010111110101111100010010011010010001101010100011110011110100010101010011101011010000110110010110100111011100101010101010011000100010011000101101100010000110011010101000000110010101001101101111000111111001010111010011010 0110111011001011110001001111010001011001001100011001111101110000111001000011010011001100110110011011000001100100101001111111101100000010010010011110111010010111001101111100111110100110110000100010100101000111010110111100011000101100000010110000000111111010110000010000111010010000010001101000000010110001100100111111010100101100101001011010101010100111000000100001011001100100101100010010100001110010 1010110010010101011111000100101010101110110111010000111011100111110110100111001001110101101011010110010011110100000101111000011100001110110000001010110010110001001100111111001111010100100111000111010101100011101101001101000000110011001110101111100000101010101111110000010111100101001110010000010010000100110000110010111001100101000101101000010110010111101110101001100011001010000010011111110100111011 0001110001010000100110110111111101011010110000111101110101011101001110010100010001111010011001111111100011000100100000010110001011110001111110110101111000010000001100010101110100101111001011000011100010111001011010100110010010011011010110111010011111100001111001101101101000111101100011111011111011001000000001011001100001110101100010100100000001111111110001101100011100001110100010111001101010010111 0100001101010101111111010001001010111111100011101000100010110001001000000110010101011101100011111001110001110001100111100110100111111111101110101000101101101001110010100001011111011000000110100110111000011101001000011010110001000000010111101010101011101000000011000000011001001101000011000111010110000010101010010010110100010110011000110100111100100010010000101000111111100101010111111100000011101000 1110000110011111100110111001100011100000101001101011000100110010011101001000010011111001010111100010100000010100110010011010101101100110010000010000001001100110011001011010111111000000010100101110011011110101110011001100011001100101001111110110001011010011110110100100100000111101101010110101010111011011001001011100100110000011000110100000100000001101011101111111011100011001111101010010100111100101 0010110010100111100001101110100100010011000101110110011110010000010101000000101000000110011010111011011110111111110010110101100100101101100100100010110010110101110010000100101011011000010100111110111010010100011100101010010010101101100101011110001101111100110100001110100101110010101010101011001010011100111000000001101010001111000011111010100101011101010100101000010101111000001101100111010010011111 1011001000110000001111010110110111100111010100001000000111111111110101011001110100110011100001100110101000100101001110011100001010000100100001000111100011001110110011001000011111001101111011101111100100100111010001100101111000000100010010001110101110000001000000010101111111111101011110001000101001101110010111011001011011100001110101000011001011011100111111011110001100010000100100100100110011001110 0011110001010000101011000011101110111101100000000010111011010011110100011000100010011111001110011010001101100000010110001100100100001110111101110101001111100111101101001001111110010010001000011110001001100001110010001111110111111001100000111101100011010111111111110010001100011010101110010110000101101010100101000101001110001001111000100101101011100011110100110010100100011000111000000110100001101011 0011010001110000111011011111101011111011101110110001010011011001011000001001110100001100011101111110110011000010011100110110111100011000010001100100111001111110100100101011001001001111011111000011100011001011000000110011100110101010010000110110010110000010001111111100001001000001110110101101001000110011100010101110101101111101011011110001001001110101011011110000100101000100100111011101011000011000 1000100101001111010100000100110111110001111101100100000011010101001000110011000011110010101001010100111110001100011110110000001110110100010110011010111010110001011100010011011011010101110100101001001101001001001001011010010010100011011000110010001000110101110011001100010100001010011110011001110011001101011101001001001010010101111100110100000110111010110111001010011000111000010110010101011110101111 0010100101000010000011001110000000110110001000011101110111101011011011100111000000111000010011011100111010001001100000101000000011000011000100111101001111101101001100101001110110000110111111010000111100101101001110110011000000100010000111101111100111110111011000101110011000100101010100000110000010100100001001000011010000000011110101101010001110101001010101101010111010000110101010111111101101000011 1110001000000011101001000101110000101101000111111000111010011011011101101001100111110000000100010101111010110000101101010010011101010101101110011011110100010010100011110110110000010010000101000111001110101001011101011010011111001111101001101001001011101111001110010100001111101000001001110110100001011101010111110101110111100100000001010111000101101100000101010000100110010100110101110001100101111101 1010001001111111011010100110001011001101011101101010110111011011111111100100010000101110111001010110011111100000001011000101001001001111101100101101101100101101010111100111010100001010110111001111001100110100110110001100010001001010100001110110000011100001000110101010001100110001100101000100111100000010010110110101101101011010101100100101110011110110100111101000000110001110101011100010100110111000 1110101010101100001010101010001000000100111000101111011001110100010011101101101111101111001100011110001011110000001011000000001110110111101001110000011001011000011100100001110011110100111110001011100110011111101100011100000000100101111110101000011111110001000111110010001000000100011100011101000111111011101001011111011101010001000111100010010001010011111000000101000111111000101001100010111100111010 0001110110110000111001011011100011111011100001000100111011100010110101111111101110011010101111101001101001001111010011001110100111000101110010100011000000101101111111001001011010000011101110110111000000010110100101000100011100011010000011100001010011000110010010111010101001110010100101111101101001101100000111110110100110011001100111001101000011110001010100010110100101010011100100101100100011111001 1110100111001000001110010111110100000111000001000111100101110001101101100100100101100011000111110111100000111101001001001100101001100011101110001100001001100111000111110100111011111101111000111110000011101100110111011111110001001100001001101100001100100001010110111000101110010110110011011011011010111010111100111110111111110110010110001110111010000101110111000010001011111000101001110011100110111011 0000111111000111000000111011011001000101101111110011101010110011011110101011111000011101011111101101111100001010000111000101001001101001110100011000001011111001101111000010100000001000101010100001010100111011001110010100110101100001111011111100000100111010110010101101101110000010100111010000000111000011001110110100111101001100000010111011111100100010010110101111100111001001011001110100010011010110 1001001110101100101011110000010111111001010101100100101001000010101011011101101011101011111111111110100111100010101001110110100001001001111100011110111000001001001001010111100111011100101011101110011010110100011100000010000100110001100110011000000000101101010110011001110010110100101110010010000101001101001010100001000011010011111100110000100101010000110011100110101000101000111111110010000001111110 1000010101010010101010100001100101100110000001001010111100101000001000001111100000011010110001100101001100000100100001111011011001010110100000101101001001010001101001001000001101111100000010101011111011001001001110001100011111000100111100010111101101011110101111011110000111010101100110001000111010001110100010100000110010000100010000000010001010000000100100111000111010100111110000101001100101011100 1100010001100000010010010011001011101101110111101000010011010001100111111011001000010010111010001001110000010101111010111111101000000111010101101010110010110001110110001000001001110110001010001000000010010000000101111111001001001111100010011110101001001110111000000001100011111110011100110001001101100100101110111100100101101111000011101000000011001010010110100110010101010100010011001011110001111011 1111011011111010100101001110101111110001110100101010111101001111010100001010100101001011000110001110101110010111100111000110001010110110001101000111111000110101010110100101010001001000010011011101110000100111001000110000011010110101111000100011110001010001101110110000011001100110111000011001010011101011101010000110100111011111101011011101000110110011111110111000100101110011001001100110001110110010 0001111101000101101001001100001000100110001110000010001111101010011000111110101011100000100001010001001110000111110100110000000111100110111000110110110101100011100110110101101100110001000010001011100000100001001111111011001000111111010001001011111101001010011001111000011001010010101000101101101100000000110011101110110011101110110001101111110100011001011110001111101001011011001000101000110000011110 0101000000110000011011000011010100010010101010001000001101100111101101110100110101011110010100110010010111001001111000000101010001101011000001111111011111001111111000011111001000101010001010111100001010001011000000100101110100100100010101100001010000010101110000010011000101000111100001011011010001110011000000100011001110010110001101100100000111110010000010000010001100101100001011110000001110010101 1111010000010100111011101001110110000101101011101011011010011110100100101001010000110010000110011110100000010100000001000101010001010110101000101001100110001001100101011001110010111100001001100111010100100000101011001110110001010101001010000000010101101000000011101011001101101011011000100011100111110011101001111000100100000101101000111110110011111100010111011001001110110000100011010010010111010001 0111110111010100000110010111000111101010101001011011011101011100001010001111101101100001111110010011111110001001000011001011011100100001001100011100010001110010001101110101100001011111001000011011111111100111001010011010010100100101000100000011001100010000001110110100101101011100100010001010011001011001000101110010001110011011000101110110001011001111101111111100100011011010001010111000010111101101 0001001001010010111011111110111011011001111000000111110010000110101101100001010111001011000100000100000011001110001010111110111111111111011011011100110100100001001001011010100001001000000010101100111101100000011101011011100011101000011010000011111100101010001111000110010101010100100111010100010011011101101010001000010000010000101010100011101110111011000000000110010101101101011011111110111101011111 1111110101101010101110111100110101111101010100111100101011001001000000111000001010110011100011100111010011110110110110001011111011010001101101011110110000111010110000110000101110110110101111100101010100001001011100111010100110010101101100100111010100101110010011000101000111000001111101000010100001111111001001111000011111100101000101100101111011100000111110000000111001100110010111001001010010010001 0000011101011011011110100100100110111100010011001101001100101110001100011001001110000101000011101000100011100110000001001110101010011001011010110100010101011010000110011101101111001001001000000101000111000110001101111000000100111101001111001001100001110110101111010000000100011101001111111100001110101001111110000101101111001000000101111111101100111010111000100000100000101101100111100110110111011010 0000101110101110100110001110100100100111011010100000010101100101000011000001110011110000000101111000101100110001000000100000110111100001001100000010010010000011000011001001001011011001101110101110011101110110001110111011100111110111100000011100100101110101110110000101110111011100100110010100111001000000010011001100110010110111101110111011010011010101011001011010011011100101011011101100100100000110 0110010101010000111111010100010101111101001010101001111110101101000100110111111000111111010001001111100111101111010010110111010010110110101100000101111100010111000011000011010101011101111001010001000110010101100110010000011001110000110001110100100010000000001100100111001001010100101000110011000110000101011011001110011000001111111011101000011011001100001011011000111000100010110111101111001011100010 1000100111111111110110101000001110111100001000010001010000001010000010011110010010010010000010100010111101001000010101110101101110111100001100100000000011100100111111000100010101001110110111110110010111100011101001100101110000000100000011001111010011001010110011101100101011000110101000011101100101111010001001100000101011111000111101011010110000110010010110000111010010011001110111101001100011010011 0001000100100000000001010111101000110011101101000010111110011001100011010000101101001011101101000011111000101011011110101101001101010001110101001000111010010010011100000001000110111010100111111000111010001101111101101100100011101101110100110001110001101111110010011010010110010110001001101000010101110000010100011100000100110111000111100000001011111101100110101110111100000011010100010100011110101000 0001100000101001000011101110111011101100010111001101011100001110001101100101000001100100000101111010011011001001110011101111110110010101000111011100101111010001000111011001010101111111111100110100000110011010101000010011010000000010000001110011101111001000011011010001001010110100101101110010000010100000011110000100101011100100100110100000000110101101111010010000110010101101001110000000001001101010 0010101110110000010001001101111111110010010110110111000000111100100111000111011100111011110011100010110010100111001001110101100000000000000100111111000100101101110011001010110100000111011000011101111111000000110000001000010001101001011101010011011101001011100001111000111110100100110100111111100111010110000111111111110000010010101011000110111011101110111101001101110011101000111111000011001100101011 0011111111101111110110110110001001101101010111000110011011101010111001101000100101111010111110101010101011111101010001110100110011010100010111111111011111100110011100100100100000101000011100001101001110001110100100000000010001111010001010111110101101000110101101110011000011001000110001101010101011010001100001110100000100101001000100100111110010101010100101100010010001111111110000011111100010111111 0110011110000010000001110000001011010010001010001001110101111110101111000111000100000110001000011110100000011010010010011111111011010100001100110001000010011011001110101110000001100010010011101000100010101111000111110001010011001110111111000001100111011011111011110011010111000000101110111011110010010110011010110011111100110001001101011000011100101010111100101001011110010101100101101110011000001001 1000111110001110010011100010110101100000111010100101101001011111010010100010101100111000111111000000011111101101111010100001001001010111111010101000111001011101100000100001111010101111001100010101011100000110101011011010101101110110001010101011100111110011010100100111000010101110001000110111000100101110100010011000011000010001111100101111001001100010110111101111000011101010101001101001000010000010 1101011010011011101110110011011101100101001001100100110010101101101100100100001000010100000100111101110101110101100001011001011011110110100011101010101110001101011000010110010110110101011110101110010000101100000101110100100111110101101001001011111001010100000010111110100100011011000111001100010101011010100111100011010110111111001011001111101011100100100101001011111110111000110010110011111011101110 0101010100111110110011011010000001010010010111100010111011011110001100000110110010101001010001000100110101010011000110101011000110111111100100010010111001110000011000000111100101110100010000000011100010010100001110101101110100110000001000100110011111111001100110101100001100010111011110110011100100000011100111111111110110010011001101111010111000101011111101011100000100000011001000111111111101011011 0100001110101101000001111010110100010111011000111000010101011111001111100101011011010110101010001100111001101100000010111011101011001011001101001110110011010000100001000111010100011111000101001110101010010011011100111110011001111010100111010110001111101100111011001000100111101000010000101011110110101110110011100011101011011011011101111101010100111110100100101011100101101001001011011010001011011100 1000110011000110101000010101011010100010101100001100111011011000010111111110101101011110001110000110011101010000001111001010110110010100100100100111111110100001010101000101011011011110101100110000011100101001110111011011011111010111110101011001100001001011000101101011111110010011001001110011100011101001000110100111111110111101010101101101101110111100101011000101110010011011001100010011111100101111 0101001011100101000100101111100110110101101011001001100001101001111100100111100101100000010101111001101111000011100101001100110110110001101100001000100000011100110010111011001010000011100110100111010000111010001000101001001011011001011111001100110000101011000011000010111111101000111100111110110000000111000011100000100111001000000110100010100111000100010000111110001001011111101110110010100101010110 1111001010001000011101100001101110010111000001011101010111010011100101010011000110111000110110111111000010001011101001011010110111100111111000110001100011011011010010000100101111011101001000110011110110111011011100000001111101111010101111111010101101101111111100111010010011101011110001110100101001000010101000010011101011011011100100101111100000110000010101001101001000000100100111101110110101000001 1010100010010100111100111110010111110100100000011111011101001101110111101011011100110000010011011000100010111000101100011001111110001111001101001111110101111111000110000101001000001110100001101010110010111001010100010010110000110100001100111001110011101000101000000100111001111010001001111010100000111010000011100110001101010010101000111010001000101001001011110000101100100110011101001001111000111001 0011110001100001100010100111100001110010000100000110101001111111011111100101111100100010101101000111101101100010101101101001011011100001011000111110000101101001010011101000011001100011001010010110001100010101000101110010010011100011010010110101010111010011110000011110110000111011101001010011101010111011000110001010110010011011000001110001010001001101011101010010000001110001101100011100011010000100 0001101100011000110001100000000011111110001111011111011100110111011010101000001000010111011110100110001011011110100010000111000101011000111011000111100001001000100111100001011011011010111000000000000100100011001000111010101111111100111001110010110111010010100100111111010010111111000110011011110011101111011100011011111111101100011000010110101101011000011001100000111100111010100110111000111101010010 1000110010100101001011000100001100100110110011111000101111110101101000110110111111111010001110001001111010111101010000100101001101111010100011110111101010001110010000011001110010000110001101101010000101101000001010001100101001111011010000000111101100110111100010000100110101010101100011100100000100000111110011001110000111000010111111001111001001010001111010000001100100011011110100001010100111010001 0110101010111011000000100010100101010100010000100010010110101010111010110011111011000110111101001100010001100010111011010110110101011100101100011001101100100000010001011100111101001100000101011000111100001111010001110010011101101001110000000100100001111100111000101110100011010111011000000110111111001100101100101100010010101110100100100000111101000101110011101010100101010100111011110101111111111111 0001010101011101001000000001001000110010000100011001000111101101001111010100111101011110000010010000000000000111101011011010010001011110011010101100100111100101001100000011011000011100011000011110010011010001010011111111101000101010110010101111001001110111111111110001100100010110001000100101000000101001000111011011000010000000110110111100101110010000111100001110000011011000110000000111100101111111 1100011110001111100111000101101011110001011011000111111000110000100010110010000000110000100001100111101001011001000000111011110010001100110111111011011110000111010001011111011000111011011110110100000111110011101111110110101000011011001101111111100001111111111111001000110100001011100011101011010010100011011101011011010000100110101111000101101010010110100100000001110110000101011111001000000101011110 1111011110111001000010011101000001100010101011100000001001000111111001000001100001101110100111010100010111101100000111001110001110011101100001000000100001111001000011100100000001101110101111100001001110100111000001100111010100111000111011111001001010110111010010101000011010101000100110001111100111001000111010110011110010011001010000000111011011101010000111000111101001100110011011011000000010011111 1000111101100111101100010000010011110101110011000011111101111010001001010100000101010011011100111101010101100000111111100001101010101100111001111000111100001100111101101110010100100000010110100100100111100101101010111001100001100101111111100011010010111111100111000011101101110100110000000111001010001101000011101011111100000010000110111001100100000000110101010101100011111111010111000110010001010111 1011011001100100100001101010111010000111000010100100000100110111101001110100100000011010111111000110010111000001010110000000110110110101010100001001010111100010110101101110111111010111111010001111110010000011010001111111011001110111110001110001110111100011001010101101111111100010000011000001100011011001010101000100111110011001101001000001011100001011000000111000100001011001011011001110111101001000 1000000100010101011110000001111101011100000010110100101000011010100111000001100000101100011011000110100000010110101000011010011000001000000000000001110101101101110100001111110000001110010110011100111101111011010000100110100110000101110011010001110011101011010101011100101110100101111100001000111001011101001100000101101101100111001100101011001011110001011101010100111110100010111111000011111001010101 0011000011011110000001110000100101001011011101110001101101000111011011100001010011101111101011011110100001001000100010001010001100000010010100110100011000101000100000011100011111000100001000101011110100110101001111010000000111000011100010111101111111001101100100111000011001011101010111011011100101101000011110110011111001010110111001001010000000001010101001000001111111011000001111000011011011010010 0111001001001011111010010010101101110100111111001011101010000011110110000011000110010010101010010111101001101000111011110011110100100001100111010000001001001010101010111100100011000111010000100100101000010111001011000111111000110010011010111000000000101111010110100110001011000010000111110100111100011101000001111001100010110001000111010110110000010011110001011000000100110110000101010111110011010101 1100100110110000011111001000010100000111000000101010101110101010011111101111111111111110100010011011001111110111100100100100010100000110001000100010100111100111100010000000000110010111010100010001101001010010000110000001100010001011000101011011010000000100001100011000000101011001000011111110001101110000000000011100010100110111111101000011111111000101001011011110000011101101110111101111001010010100 1010010011101111110101001100100011101000011011111001000000011000000100111100101010000001111101111001000111111110110110100100000100110011110011001011001011100001011110101100110011101001001011000001011100100101110111110011111100100111000101010110000011110110111100001111110011100111001111010011110101100100110011101011111101000100001110010000100010000010100110001101101110111010011011100001000111000100 1001101000100111000010001000000011111110110101100101001000011010010110111100110111011101001010000100000101001110001000100001110110101101000100000100111110111010010001100001010000110000010010000101001101011011001100000101001100110111011001000011110010101101001000100001000001110100001100010110011010011111100110011011101010100001110111000001110101000110100100110011011111110100101011111001100111110101 0100110110011101101111101101111100111111101101110100100101110000000010101001110011101011010001110111111101101000111101011110010011011101010111111010101010001100101101100001010001001100010000110010101010111100000001110100100111100111000110110000001000101111111010100101000110101011111000101000011111100101101010110000111000100101100000001011000110000110111000100001100000000111000010100001100011101100 1000110100001010110001100110001101000001100011100100111111010010000110001010000011101111100111101111100110111100110111001001101110010111101110011111000101101011001001110001000110000110001101111000001110110110101010010111001101100110110110011111011001001101011010000001111001000111011110110110100101100001000000010111101111100111110101001011100110101111010101111111001010100101011111100000111100000011 1111001100101101101110101101000101100000111010111000010010010110001111011001100111110000100000010000110101011111111011100001010000010110011100000011011111101000101101000011011100011010100010101101011110100110111101000110001010011011011010101001011011111000110111010010010000011100010100000111001110100001010101110000110001001100011111111011010110101010101001011101110111111000111000101000000010011100 1111010100011001111001011111111100010010011111000111010101111011110000010110101100101100110110001101011000001101100010100010100000111000011001010000001111110101010010001101111001001011111111011101110110110010111010100111000011010000110001100111000011000101111010011010110111110001011100100110101000001110010111001101010110111101001011110111010110011001111010010100111010000100001100001000011101010100 1001111111101010001001111101000100110101010011111101011011001110010100100101011000100101111010111100000101100101111001101100101110111101110111101000000110001111011011110001110100000101100100100110100000011000001001110001110101001011101110111001010110111001001011010010100111001011010100000010000101000011001011100100011100111110000111001111110111010011111101011000100011011110110011010001011100101001 1001011000010000101110011110011111111101100011111010001111101110111100000111011101010001010011100011011101111100011001110010101110100011110111101001100101110100000001001011011100000100001100111001000000000101100111001001010111111111110010001001110111100110011001010010100111000011100010100001101110000110010011100010100011010100100000110110010110000000110010000001110110010110000010100110100001100010 0100110100011100011100011100101101001010111000110101001011111001010000000001001111110100101111011110010100110010100100101101101110010110101001011011100010011000110100010101000001001011110101100101110111101000101011111010001101011101001100101110100100010011001111011001110101101100001011111011100101000001010111000011001011010110010111000000001100111101011110010001010110101011111010000011100100001000 0111000111110101001011110100110100001010011000100101110100101010010001001110111101111101011110111011111100000000110110000111010010011110100111000001100000001010101111101110101100011011100111001011110000001010011011010101100011000100100011011010111101111110110011011010011011011110011011011011010110100001000100011110100000000000001111010011010001100100101010111010111110100001110011101110110110101111
cTrader Algo

【cAlgo】cBotでMessageBoxを表示する【Tips & Sample】

7/15/2021

4年以上前の記事です。内容が古くなっている可能性があります。

メッセージボックスを表示したい!

ツール系のcBotとか作ってるとユーザー向けにメッセージボックスを表示してあげたいことがでてきます。こーゆーの。

MT4(MQL)だとMessageBox関数呼び出すだけで簡単にこんなメッセージボックスが表示できるようになってるんですが、cTraderではそうはいきません。cAlgo APIにはメッセージボックスを表示する機能がないのです。

いや、簡単にできなきゃできないでメッセージボックスくらいなくてもなんとかなるんですが、ちょっとだけ不便なんですよね。

今回はこのプチ不便を解消してみようかと思います。

 

さてどうしましょうか

というわけでメッセージボックスらしき機能を実現するためにどうするか考えました。

 

方法1 ログで我慢する

一番お手軽簡単な方法。いきなりメッセージボックスじゃありませんが、まぁ目的の半分くらいは達成できそうです。

Print(”パラメータ設定が違うよ");

メッセージ出したいところでこう書いておけばcBot Logのタブには表示されるようになるため、一応お知らせは可能です。

ただ自分用cBotならこれで十分なのですが、他の人が使うことを考えるとそうはいきません。そもそもログウィンドウなんて見ない人もいるでしょう。気づかれなければ意味がありません。

また、もう一つ大きな問題としてcTraderではインジケーターのPrintメソッドは(Automate画面以外では)ログウィンドウに出力されないという残念仕様になってるため、インジケーターにおいてはこの方法はまったく使えません

 

方法2 Windows Formsのメッセージボックスを使う

C#使ってるんだからWindowsのメッセージボックスをそのまま使えばいいじゃん、と。ごく当然で一般的な対応策です。(そもそもこういう思想でメッセージボックスが実装されてないんだと思います。)

簡単にできないとか言いいましたが、別にそんな難しくはないんです。ちょっと参照設定して、標準のMessageBox呼び出すだけなので。Automateの編集画面からはこんな感じでSystem.Windows.Formsを参照設定します。

でコードはこんな感じ。メッセージボックス表示コードは4行目だけ。

    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class NewcBot : Robot{
        protected override void OnStart(){
            System.Windows.Forms.MessageBox.Show("パラメータ設定が違うよ","エラー");
        }

 

これでいわゆるフツーのメッセージボックスが表示できます。

ただ残念な点としてはAccessRight=Noneでは使えないのです。上記ソースコードにあるようにFullAccess、いわゆる「無制限のアクセス権限」を取得する必要があります

個人的にはちょっとメッセージ表示するだけのためにわざわざFullAccessとるのもいかがなものかと思ってしまいます。もちろん自分で使うだけなら別に気にしなくていいんですがなんとなく気持ち悪い。

あと見た目もイマイチなんですよね。Windows.Formsなのでどうも古臭く感じます。Windows.FormsじゃなくてWPF使ってデザインから作り込むこともできることはできるのですが、そこまでするのもねぇ・・・

 

方法3 cAlgo APIのコントロールでメッセージボックスもどきを作る

なければ作ればいいのです。ということで、それっぽいクラスをcAlgoAPIで作ってみました。

このクラスを組み込んでおけば、こんなコードを1行で

MessageBox.Show(Chart, "パラメータ設定が違うよ", "エラー", MessageBoxButtons.OKCancel);

こんな感じでチャート上にメッセージボックスらしきものを表示できるようになります。もちろんアクセス権限取得も不要です。

色合いはcTrader風にしておきました。ダークモード用です。

ちなみにあくまで「もどき」ですのでマウスで動かしたりできませんし、モーダルにもできませんが、ちょっとしたお知らせだけならこれで十分じゃないでしょうか。

一応ボタンの種類設定もできますし、ボタン押したときのコールバックも指定できます。作ってる途中で面倒になってしまったので、若干中途半端なコードにはなってますがよかったらご利用ください。

気まぐれで作りましたが、自分で使ってみて使えそうであればマウスで動かせるようにくらいはアップデートしようかと思ってます。

使い方は簡単で、ソースコード中のMessageBoxクラスを自分のコードに追記したらあとは表示させたい場所で

MessageBox.Show(Chart, メッセージ, タイトル, ボタン種類)の形で呼び出すだけです。第一引数にチャートを渡す必要がありますが、メッセージ、タイトル、ボタン種類を渡す部分はWindowsFormsと同じです。(引数の感覚はどっちかというとWindowsAPIのMessagebox関数に近いかも)

ボタンに応じてなにか処理させたいときは、(こっちはWindowsとは異なりますが)MessageBox.Show(Chart, タイトル、メッセージ、ボタン種類、Action、Action, Action)とボタンを押したときのActionを引数として渡してください。

一応使い方サンプルのcBot本体ソースコード全文載せておきます。なんとなく使い方のイメージがわけば幸いです。

[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
public class MessageBoxSample : Robot {
    protected override void OnStart() {
        // --- この部分はサンプルメッセージボックス表示用のボタンを並べてるだけです。
        var panel = new WrapPanel { HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Bottom, Margin = 10 };
        var labels = new string[] { "一番シンプル", "2つボタン", "3つボタン+長文", "好きなボタン", "アクション付き" };
        var btns = labels.Select(l => { var b = new Button { Text = l, Margin = 5 }; panel.AddChild(b); return b; }).ToArray();
        Chart.AddControl(panel);

        // --- ボタンクリックでメッセージボックスを表示させる
        btns[0].Click += _ => MessageBox.Show(Chart, "パラメーターを修正してください。\r\n(シンプルメッセージタイトルなし)");
        btns[1].Click += _ => MessageBox.Show(Chart, "このまま続けますか?\r\n(第3引数にMessageBoxButtons.YesNoを指定)", "2つボタン+タイトル付き", MessageBoxButtons.YesNo);
        btns[2].Click += _ => MessageBox.Show(Chart, "このcBotは〇〇〇のため、パラメータはXXXXに設定する必要があります。また、時間足は〇時間足に設定してください。それとついでにこれとそれとあれと・・・\r\n(第3引数にMessageBoxButtons.YesNoCancelを指定)", "3つボタン+長文サンプル", MessageBoxButtons.YesNoCancel);
        btns[3].Click += _ => Chart.ShowMessageBox("逆張りはありかなしか。\r\n(表示するボタンは最大4つ、それ以上は例外投げる仕様)", "カスタムボタン", new string[] { "あり", "なし", "論外", "考え中" });
        btns[4].Click += _ => Chart.ShowMessageBox("再試行でログ表示\r\n無視でcBot停止", "アクション付き", MessageBoxButtons.AbortRetryIgnore, null, () => Print("再試行が押されました"), ()=>Stop());
        //            ⇧ Chartの拡張メソッドになってるのでChartのメンバのように呼び出すことも可能。
    }
}

実際の動作はダウンロードして動かしてみてください。メッセージボックスクラスのソースコードも一つのファイルに入ってるので、気に入らない部分は適当に手直ししてご利用ください。

 


まだコメントはありません

新しいコメント

コメントは承認後に公開されます。承認まで次のコメントは投稿できません。

cTrader's Life

© 2025 ajinori