1000100000110001100010011001010010111111010101111100001111101000100011111101010010110011110111001110001010010001011001101111110110010011100000001001110010110111010111000110011000001101100101101011101001110001001111010001000100000000100010101110100101110100011000101010111001011001011101101011001100111101110110100101011010000000011111011001110010011101011100011011001100000010011110110000101111110011 1111011011110110011101100010011111010111100111111011011010001101101010111111000011010101111110110010010011111011001111110110001101000011100001001000111101001110010000000110001011010001011001110111011111011011011011100000101011010110101111001000110111010010010010111001111110110001000000101010001101100100110111100101001001111110111111000011101011111001111101111010011100101000101000101101110110001101 1100110010010111100011100101010100011011001100010101100001110110001111100010010000110000110101111011101001010111111011100110011000001100101111000010001010110000010010000000011000001000100101111100011001100100010100010001010111110101100110011111111000100001000111000100011011111010101011101100001100000011110010010001010111110110100100010000000100101111111000101110100000000000010111011101000111110000 1110100011101111111110111001101111011110011110011000111110000011100001110100001110010000001001111110011100111001111010101010100011000010110000100010110111100110111101100000010110011001011100000101001111011110000011101001100001000100000100011111100100111001100010010011000101110111000110011000101100001100110011001011011001111111011111001011111011000101000101000111001010100000100011110111100111011110 0011110101001010110100100110001100001001010100111111101001000001000111010001000101101110010010101100111111101001100101111110000101001001001101100110110001110011001000111011001110010000101001001111110111101010011111101101010011110000110111000100000110100000110100101001000101011111010010010110100110001100100110010100101010010111010011100011101010000000010111000110101000100101011101000011011110100001 0001011111000111011001111101101000110110110100000000001101100010110111101001101110010111000011000111110110011111011100111000000011010100000101001000001010110100001011100001000110110100011100001001010001001101001111101110100100110110011011010101000010000111111000101100100011110110011000001010100111111101100100011000100010111000010110001001001010110100110001010001111101100100001000000100001000000100 1001011000101010001000110010001110011111100100110111000111111100011101101001101011111011001110001101000111001000110110001110110000010000111111101001100101100101110001110110010101111100000011100111110100110100111001100100011101110000101110100111111011000100100010110001100111011000101011011001110001101101000010110001000101010111101001100100101111011100000000011000001100100110010011011010000111110011 1110110100101111100010111101111111101110010111011101101010000011100111111001111001010011101001011100000110111110110100000100011010001101111000110100111000011101101000010011101110010010000011101011011000110101101011011011010101011101111111101001000010011100000111110011101001010010010111110110001001100010100010111100110100111011100111001011000011000111011110000011001110101111100001110101000001101111 1100011111011000101111111011001101000101110100001001110001011001111101011110000110000111110000001111100100111111010010011101100010100010101110110101001100101000100011110000000010111000010011111010011011101101011010101011001001001100001000010111000011000100000011111100011100100101011111000101001011001110010111111101110001010111000011000110011011010001011111001111010110110000010111010111100001001110 1111000010100011010000001111000111011000101101111010011100010000001100011110000110100010010010000110011111101111110011101101101011011111110100010010110001001101011110010001110100110110100101011110000101100001100000010001110000000010010001011011100011010111110011001101000100000001001101010111101011111011010111000001111111001111010000101101100100101011000000101100011101100111111001010110001001011111 1011001110000010010100000101101110011100011011000111101101100010011001011001000001001011011010010111010100000000011111111011010100010001011001010010110101011011101111111011010011100111100010011110101001101111011001000011100110001011001101001010111000110111000110111000011010000000100111101000100111111000010011011110101010000111110101000010110010111010010110001010111011011110001000000000001011100011 1111001110011010001110000101010001010110111000011010001100110011000111101010111011101011100100000010101101001010001001100101011100010001100110110000100111101011000111101001000011111111111011001111001010100010110001101010110000100001010000111111110000110000001001011010101001010110001100001011101001101110010100010011110010001000010001010110111011101000011001000011110011011100010001010110010101101101 1101101110010101011011010001011000001110111101111001110001101011110001101110101001000111011101100011110001000100101010100111010000001110010001110010110001110001001100000111000100011110100100110000100000111111111100000100100000111111000110111010101100101110100000110111001101110101010000110100100111011011101011000111111110111000011010111011000110011101101111000111110001011101010101111001001100111111 1011001001000110100100111101101000001010001000100000100010111000100110011110110001110000110011001111010110110000000001111110000010101100110011011101100010001110101011000111110011111000100111110111100101100011000101011100100010101100110010000011100111110100000101111001111011011101100000100001101010111000110110110101110011100001110000010000101011101100100111111111110110111001000000110000111111101111 0111011000111110101111000101110100110001100101110100101110001011111111110000101111110000101000111100111110010111100001101111010001111001001100001110000110011111011001010101111101101010000100111110101100111001100111010001010011110001101110001011000100101011001110100100010000100010111011100011100100111100101110000110100100101101101100001101100000100011110100110111111011001000101111111010000101011000 0011111011111011000010010101001001100011001100000011100011001111000101101010011110111110001111000100111010110011101010110011110110111001001000010010100101101100101010110110001000001011101011101101001110010100010011011101000001110111111101011111101101110001110110010010110111101111001110011010101101101110011001011000000001001001100101101001101110110101000100101111001101110000101011011000011001101011 0010010011100010011110010011000110111100101110111010110110110101001100000111010111101011010001001101001010100101010100001110011110001010001111100001011110011111101101100010001010111000011110100110001000101100110111000110111001111100100101111000011001010011000101101101111111000110001001001011010011110101001010001101011000010011000001000000010100100101011111001001111010000011011101000100101011011011 0111000110011110001011000010101010111011111000010011110000001010011111011001011001000100110100001010011101011001010001111010111101011001000111110101011010011110110100110110010010101110110010101100010001010100010001010111000011110100010010110001000100111111001110111010001111110011101100010010111011011101010111011000011100100111111100000100000100101010111000101010001001011011111111000011100100110011 0111101001011111001101001010110000010111101111011011110101001011011011111011111000100011011101111111101001101101111010000110101101100001111000100111110100010011010001110011001010010000001000101001010101110101111100010101011101001010001010100101010111111110111001011000001110010101000001010001010100001000000110100110100001010000111011000011010110011101011010110111010010100111111110110000101000100110 0001000101111111010011011011110010100110100110001110001010101101010100011010000001001000100100101000011100110101110001010110000100001101111010010010011001111110100001011100100101001010011110110010011010000000000110111001100000101100100010111100111010100000000000100001000110101100001000010001000000001010111101110101101000011111100101111010101101010101101010101010001011101100101111111101001110000111 1010101000101011111111000101011001111111010111100110011100111111110000111001110100101111011100011111110110010110011010000010100010011101001101110100000011110111101010101011100110110110110100000010111110100010010111111111111100010111101101011010101010110111110000011101111010101011001011100110111001111100010111001000111011111010001110000000010010101100111100101001100010011011011110101000011001000111 1011111001111011010100100010001000111101010001111010001000000011010011110000000111111001101011111101000001111100101000101100111000010010110101111101011001100010101001110100010110001100111000101011000101000101011011100110000110101000011111001011100101100101101000101100111000000000101011011010010100110010000001111000010001001101111010010010100100111100000101101111101111001101101001110110001001001110 1011000001110110000010101011001111000100011000011001100110100111100001001101011010011010100111111000001001011011000000100101101000011111110100111000011111010100000110101011110000100010001000010110001100101000110101110101011010011010110110111011111111000101000010101000101110111011101111010111101000111010100100111001000110111000010100001001101011010011101100001011101011010011101011011100111110111100 1011010110000110001101101100000001101100000100100111110010001110100000011110110111110000000101011001101011010111010001000111111111110000101000001111000100010110100010011111011101111000111100001001010010111110111011010110000110110111001100110111001110111110100110111101101011101000000110111001100111000111110110100101011111100110011010011001000100010010101011000111001001011011111100011101001000101000 1000101110011101111110001010101111010110100100110100100110110010011001110100001110100011111001000110110000011111001101101100101001111110000000101011011111001011110110000100010001111111000101001101001010100011011000000100001111011100010000100111011100111001110101011011110010111000100001101000101010011011010100110011100111011000100111000001101000010001000101000110000011101100001111101010110101101010 1001100110011010101100001011100100111011000101111110001101110010110100100100101011101111011110001110101010100111011110001110000010011000110000000011011110111100001100001010111110001100011111111010001100001111110111100101010001110000111101001110011111111001001101000110011110101111010110000011011100000100011100010011001101100101111110111001101111101101100100001101001100010100001100111000111000111010 0010000001110001000100010100111100111000101110001101000100011000010111001010011000110110010000011011010101001000110000101111010000111100110010011101111100001010110111001100011010011001011111101010111000100011011010111111110100000110000000110001011100001111000110010100100111100100111100011011100010101011000010101110000110001110011011000101000011111000110000000111010101111100111000001110000101101011 1001111011100101011111000011101101001000000001101001000001001110001100111110011111110101001100100111011110101100010011110010011111010000101011010000100110010101100011101100100110100111101001110111101000011100000011110110001000100011000011010101010110000111001100001000011010000011000101101000110100010000111001011110101010011110110011110010110011101101000000010010011110101111010101101100010100011001 1111101101000110011001011011110111000010001011010100110000111110101000100000010100011101100110110101011010100010110010100100101001101010101100010110001000111110001010010011101000101111001101001001111101011111011001110011110110111100111110111001000111101100001011100101000100000001010000101101110010000000110000010100101100101010000010010010010101100000101100110110110101000000011011000001010010001111 0101001111100001111001110001001110110000011110010101101011010110011110001001111100001111111000111111111111001111111000001011011010101110010111101110110111110011111101111111011011100100101101001110100101011011101100101110111110110011000010100011011100100110101011000100110010011111001010111110001000111011100101001010101101000111000000011110000000000010001100011010010000111101001111011110010010101101 0111100000111001100000101010000100111111001111111110101010000000110111000010001010000010000000111100110101110100011100011111101101010000101100011010011001001111101101101000001101001101000111011010011010000010110100000001110100001101011101001011110110101010101100001111100001010111111110001011100101010101111010100100110101000101000111110011000111101100000110010110001011011111111100001010011100101111 0110101010011011001011110110110100010101111101000101010001111010110010100000011111110011001111111001101011110101100110010110001101101000001011101101100100101110001100011111010011101010111101001010111110000011100101000111110010001000001110010111111011010111110101110110100000100000111110001010010000110011011111011001111000110110111100100101110101000110000101000011110011110110101000100011011011011101 0010101010000001011100101001001100100011110011011000111110010011010100000001101100010100101010101000101011001000100111001010100000111011000001010111010110001010111001010101101110000010111010100110010011111110110101011000110111101111010110001111100100100001100111000010010110011001110101110110001011011101010111011010000000100110000111010001101010111000011011000000001101001010001110100101010000010000 1011101110111111110110111111000011011111010011011101011001101001101101010101111001101101010011101000111100010101010100111000001101000011000101011000111100011100110011101100001010010110000101011001111011100100010010110010111110011110010000000110011001111110000000111111111100010101111010011100000111011110100100001011000100010011011000000110110100100111101001100110110111110000100010110111111101000010 0011111111101010011111101101001110001010110110111011101000100000001000100001001011110011111000101011000101101010000001010111100010000100100111000101001100011001010111100001001111110100000001001110001001110010011010010100101010110011010001111110110101000111000100100111110101010011100001110111000110111101110001000000110100000101111111101111101100000001101110100000011110001011001010111110011010100000 0101011101001100111011011011001100011111001010011110101001001010100111010010011101001110111110111110111000000110011111100001000110000100101000001110010010110100011100000110010110001101100010010100110101011011101010010000010010100011000110110011010110110001110010000111100011001100101110010100101111011111001111111001101000100010101110100100011000100111110100000001000001001010111010010001100011101111 0101000001100110011111111100001100011010011101110000010001110000101111011100001101010110000001101111011000110011001001110100111110010110000111001000101110111000110110111101110111110010100000010001110110010001110011011100001001101010010100110111001011111100100000011011100110100101011101110010101111111100010000110010001101000010000111111101000110000001010110001001011001010000101010111100000011011000 0110001011011000011001000100100100111101000110100001111101100111100011011101101011011010110110100010111010101000000111010111001001011011001101101010111101100110000010011011000000011111101110001100110000010001010011011100100010000010100001111010100110000110100110111001110011100111011111001010000101001111001110011100101011111110110110101010011101010000010000111100110001101000111001100001101111010101 0110110110110011001110101010111011100011000111011000010001011011011110000111001101000010010001111111110010100110100110010100111011100001111010010000100110010001000000000010110101100000000110110000111000010110100110101011010111101110011010001000111110000011001101010111000010011101111011110010101101000000100110110000101100010111001010110101111011000010010101010111101000001001110111011011100111011001 1100001011010111001000101001111100011000010111000000001111001001001010000101010100000110101101101111010001011000000011001010110111100011000000110100110000101100000001001110110001111111101010110100001011000110010100001010000100110011101011000000110101101001001101111000101000011000100010101101110100101010000011101011111011100111111010000100001110101100001111111100001101001010110001111111010001100111 1111000111010111110011100110010111000011011101110100110001000101011011100111110101111010001011100011101010111100010001001101110101111000100001111111001111001110011010100110000010011101100001100111001010111101000101100100101101010010011010110001101001111110001110010100101110111010101110001110110111000100010100000011100011001100110110001110111110101110000011001100110100110000100010100001101011011100 1111100000010000110001110001011010011110001010111000000111100000011100000100010100100000010010001111101010011111110010010110111101111100111111110011001001110011101010001011011010011000000011100000110011011111110111001111001100100000110101000111110001100001010000101001011110010111101000000011101110010100110000110010000101101010111011001011100011100111001011001001100000110001111011000101101110001100 0101100101000101100100111110010000010000000001000011010101100100100000011010100011110100001100011110001110101011011000100000100111100110111110011111000011101110011001111001110010011111110011010111001110110011000001111001100010010101011010010010000000101111011010110110100100101001001010001010111111101000000100101101010110011101111100001000001000000101101001111001111101001010001100100101011111111101 1010100100001101001000000000101111100101111111001100111011011010101100001100111100111010001100011000110011111011011011010110010111111011100110001110000000011000000001011000001101011011011101000010100111110111000011110110111000100111101101001001001101001011000011001110111010111101101011011101111001011101110000001101010110101001110100110101000000011010010110000101001111101111000110001100010101100000 0000100100001000010100001101001110011011011111110000011100101001011110101110001100101111001101011110010101101011111110000100011110011101011010011001011110100111100100101000101001101101010100100101111111000000110111010010001011000011011101011111101010101011010101010110100101010001111000101101001001101111101110001011001100001100011111000011000001101010111011011001110001011101011001110011111110111101 0111110111101100011011000001101010011000110000000010001000111001011011000000001010000111110101000000100011101010011101101011000000000010001111100110010111001000101100100010100010110111101001111110111010100001101001110011101011001101010001111101101001111011100010010100101110101001011011101111010010000110000011001011000111010111100111011100010101010000001111001010100010110001110101010000111101010101 0111010111011010010101110101110011100111001101100111111110110000110010011101010110110110111100101010000001100100111000011111000111011010100010100110100011011101111000000000100110111001111000100000101111100011010000100011101100101111110001100100110011111101101110110001100111011011110110111001111111011000001110011110001001010110100101101001101001100101100000011001111111110011111100111001101011001101 1011011000010011010101101001110011010000001100110111101110110000101010010011100101101101010010000010101110100110110010100111111101100110001010010101110110000010010100010010100010001010000110110011010111001000001001011101100000101011111000110111101111010001110011000000111011010111011111001111110111011000111100011110011001111100110101101011010100100101111000011110111101100000011001110011011100110011 0010000010010100101100010001110100011000111011111111000110100001001100101110010001000011000111011100011010011100000000001101111111101000000100110001010010000100011110011011111101110111110000100110000001010011110010011100011110110011101100010111111110011000010000100111000100101111000000100110001110001001010101110011010011111110001010111011010111000100000000000000001100101011111110101011010000011100 0111000001100101011100000111110011101010110000110111100001000000111011110111100100011011101011111110110001100100100100011111110100011100110101110010100100110101000001101011100010011011100000001001010110001011010100010000001010011101010100011010101110110011011011011001111000001011011000100000111010011101110011101101111101111001110011000011111110000001111110111111110000111100110010011101101101001001 0111000100101011010001110111001111010101001110100111010011001001100100111010100000110110011101011011101100001010111101101011011110011010011110101111101010110100111001011110111100101110111010101111101101110100001110011110011000010011001000010010111000011011111110011010011101010111010110111111111101010101110010000101011000011010011010100011000101100111110101001000100010011001100001101110100101000110 0111001010000110000011111010100101000110111000111011111111011101000111111110110101101011110011000001011011110111110000100010111000111101000110000110100011100100011100011000101001011111010000000010111110010001101101001010100110010101100110101101011001110100010011100011010111111111100110010101000110001101101001000000001110011010110001010100100110001010011101101100111010000100100100011011100110111011 0000001000001110101101101000000001010011100100111011000110000011100001011000111101010000100011111110011000100101001101101010101111100111101110100011000111100101110111110101000100001111101101110011110110000101011100011000111100111001110000111010001111001100111011100011010111100101101111001001011100110011001111010111010101011001011010011000001110011010010010000101100011101000010001111001110001101110 0101110110110001101011111010011101110010110110011111010110010011011110101000111011010000011100001001010001111010011011010101011000111100001101110101101110000100101110000100011101100011110010010011111000111011010111100010110100010101100100100011100011101111100100000100100100001011011000100010000100101100011101010010101101101001000110001101101011010100100100110010001101100110101111010111000111011111 1011010100010101010101010110111111101001011111101101100100011000010000011100101000000110100001100110111011111101111101011100101000000100111000011100110000000010110000001011110000101001011110101101001011001001010010010010001000111001100111101111110010001111101010110110110011100100101111110100011010101110100001010000110010001110010001000101101101111100110111011000010101100001101111011000101001001010 1111111111101011101100011111101010111100011001101101010111001100111000010011000011111101101000110010011001100000011111001111100000110110111000111110111011100001110010111111110011111100001101111110100001100110011011010001000001001000110000110001010001111000110110000101001010111000100100000011010101011001010101010011000111110011101011100100111010100010011011010110000000110111010100110111011110111110 0000101000001110101000111111110001011010110111010000100111001111100010010001001110001011111100100001011011111001100100010100111010111111011001001010010011000100001000000111110001100000111100101010101111000111111001111011110011110110010110111101111110111110100011110100110010011101001111101101000010011100100101111011101100010000000100010011101010011001111001111001110010001101010100101000011101110101 0011011110110010011101001011100010001111111100101011011000011110111100110000001100100001000111101101011111010000000000101001110010001100011001110010101010101110000101110100111011100010100101110000000011111001010010100001101100110010101011101100101010100111001001000100100011100000101010011111001011011110000101001001011001101111000111011111111101100111111000010111010011000100011100011010100000111110 1100011010000011010000000100111001010100001111010101011011000101110101111011010111000000111001100011000010101001001011101010001110100110110010101110110000001011100111000100001000111111001100100101010111001001110101101100110111000000100000100000100010001100010010101000101000011101100011111010111011010110111111011111111110000010010111011011010001010111011001111011011011011001111110101111110011110110 0111010010110011110001100001100000100010100111001010100110101100110000111101110110101000101110000110010011101010101110001010000101000111111110001000000100100111001111001110010001110110010010010100100101010110001101010011100100000101001101111100111001011011011000010110111100000100101100101011111001011101101100000011100001100000111011010000001110100001101110010001100100111111110011010101000000000101 1011010011100100011011001000110010010011011100111000010111010010011111010001010001100100111101010110110111101110101101111111000110100001110101001011110000101000011100000100101010110101101111111111100011000111001100000100101001101011001010101001101101110111011100001100010000110011001100100000011100111101111100001111010011101001001011000100001010100101001101000000111100010110000111000000010111101111 1111010000110110110111100110010010011100010000101101110100111111000110000001001100010001101001010000110000111011000110101010010000000110001100111001001111100010010010100110000010110101011100010001100100110111011110000000111000000000011100011100010111011001001101100111101111011001011010100001101000111011000101010100001101110111101111011001011101010100000111011010101111101001111110001101110000001111 1001010001110101111110111001111001111110011000011001001001010111001001011010011100001010100001010100110110001111011111101100011011101011000000011111110001100111010000001001011100100100001100111100101001100000100110011000110001010101110000101111111111000110111110100000000001011000000100100000100001110100010110111110101111001010100100100000000100001101100000001011101100100111000110110110010001010010 1101001111001111000110010000101000000100011000100100001001101111101110000101101100000001101111011011101000100100001100011001110100111010111101110111010110111010101101111110000111100010101000110011001111111011011100000000100001100101000101101111011010101100110111100100101101100010100001011110011111010001010100001000100111110001111110111100111100100011011011000110100011011001111101100011011001011100 1111001100101011111101000001010101100101011111001011010010011011101001110100011100001011001110111010111010010101110100110101000110100010000000001111100011011001011010011101001111000100010110011111100010011010101110100111010110100111100000000010011111110011110011110110000001000100111011010001001110100101011110000010000010000000010100100011001011001101011100010101000011110110000110000000111101110100 0110110101000001001101010111110001111110101101101000001011111001010100011111101100001010000111011001010011101110110101000111010110111101001111111001101010101110111001011000000011101101001101001110111111111001011001011010110110101000111001101001000010111011110011010010110110100100010110010100111110001011011011110010011001001000011110110101101011010100000001110000111011000001010011110110011101100011 0100010010011011011000100010011000101000100010111100111101010011100010100000010010101101011010010011010100010010001010101010011001101110001110101000000101001101011010011110001100001011101101100001000111100011101010010101000111000100110111000111111100001110101011000110100110110100101111101100100110101110011100000111011110001011001010011000101001011000101000011101100011011001001100000010000000001000 0011111000100111001100101011010001110100101000101011011100010101100110111000001111101001101011010010000000010001011001101100010110111000000001110010000011010010000000001011010011111100000000001010100111010101011000101101000011010101110110010101101011100101101110010011110100001001111111111100111110111100101100001110001010100110000000000011011111010011000000100111100101110100111010101000110110011001 1111110110111100111110101110110011010100010100111010011000000100011100011101001111001111000010111000001101110111010010010100001001010010110000001110100011011111111111010111101100001101011000101111011010110011111110111111100010101001010011101101111010110010010001101101001010000011110110100100011001010101000110011010110111001011110000011101110010011011011010000010110000101011110101001001111010000011 0101000010110011001000110000100000101000111110100111010111011110000110100111110000110011000000001001100011011001000011110110011101001111001011110110010111110100101101110100000100110100000001001000011100011011010011111011010110110101110001111000010110000011011110011101000101010110110011001111100110110011101000100110101011101011101001101100111000100000110000100101010101101001001110010110011100100001 1000011101110110101110111000000111010111111001100001000000100111100010100001111111110011100111101101001010001101101010111100010010100100101000011010110000001001101111110100010111010000001011101111011011110010101000001000011111111010011110010011001100110101110100101100111101001000011010110101100010000110101010110011001001110101111001011001111000100010111110101000001010111001100011110010000100001110 1011100000011001000110111001001000010110011001000111100011000110011110111000101111001111010110010011101001001100100010011011010011110011001100100111011011010001010110101000011110000011100110111010111001111101101111111001001100011001111100010001100100001110101111011000100110101010011111100010011101010010111010100111000001110000010100111111000100010100010100100011010101101001010100000000000011110001 0011110111111101100000011101100000001110000101101011100110111111110111010010010100110111111110101110011111011010111111101101000000101011001100011100000100010100100010011111111101010000001100100001100010100101010011111100011010100010011001101101100000000101101101001001001100101010011101100101000011011100011110111011011110000001111110010100111000000101111010111110001111000011011100000010101001100011 1101100001110010011000010110000000110000111100111110111101000011001100100001011000111110111111000101111001000110111111101110101101111000100010001000001101100010100101000000100111010100010111011110000000010001111100011111101000111000110000100011100100101100001000100111001111010010100001010010101001001011001011000011000111011111111101101101100010101000101011000001111000100111110001100111100111011001 1001010001001011011001000101101001011010100001010111101110111010110001100101010111000110001111110001011001111010010110101011011010101100000110101001101010001111101100111010110100011111010000101011101101110110011000001110111101010010100010111100010100001101011101111001101011011001000011001010010100101101010000001010101010110010110001101111000010001110011111000001111000001010100001010100110010001111 0000011100001101100001100100111101000100010011011100010011100011011001100000110100000100101001000100000111000100101000111111101010000000100011000101000101100101001001011010011010100101100001010010101101101011101111111010101000111011110111110011101010011011001111110110111011101100000000011010010101010011110000100011101001100011000101010100111111101110100110100001001011100101000010111101001100011001 0101010100110110101110111110010100111111011110010010010001110100101000101100101111001100110001101000110100010100000000101001010110011010110011111100101101101010111010110010111111010011101001000000010010001110011011111101100101000100010100110101010011010000111101000010100110110010101000111000001010110001011101011000000010001000011101010110001011111001100001100101011110010100100111011101110101111011 0100110001011111001101111001011010000001100100010010111100100001000101001101111111001100011000100101001001101001110001000010001111101000110110100111000010101010110100111100010010110101011010000100000101111110001011010011111110001010000000001100101001001000100001010110001001011100001010100000110101100100101100001101001001000110111000000110101000000111011101111000010001010000011110101000010100111011 1000100100011000101111111100101010011000100010001011110101001110000111111001111001101101101101000010100110110010011000100000010001111110100010100100011000011001000010001101000000001010001110000001010001001011000011111011110110111101011001011010101100010000000010011100110010110101011101001100100010001100101001111100000011110101111011000110010000100100001110101000010110100010101001000111011011100010 1001100010011001101100101110101011101010111110010001001011010011110000010010101011011000010110010100000010100011011000100100101011000111100011100010000100010001100010111011000111000001010000110001110010000011100100001100111100001000010010000010100000001101101110010011111110101111101001100111000100010000110110010010111111000110110100110010011110010111101101101110101111010010100101001000001011111010 1011111010001111110110011110000111110011001001110101101101001101001110001011111100110111111101010100001001100101110101111000001001001111001001110111001001111010010111100001100110101001011111000100101101100001011101111101101011000010110110010000101100001110100000100111010101100110010100000010110001110010000000010011101111100010101000000000000100101001101011000100001010110001011010001000110110101010 0011000000010100000110100110001000010101001100001111100111011010001110011100111100111010000110000110011011000110000101001110110011000101001011000110101111010111111100011110001100000000101100110001000001010010011010101001100101000111010101001111000100001100010011010011100111101111101000101100011101011111110010101000110100010110110111111101011010011101011111111010111011110011111101001110010010000011 1011011010101100010111011000111001011000101011011110001110001010010100110000001110110111011000101000101111101100110100110001110011110101000010110000001111111001001110111100010111011111110001100111111001001100001000010111101001100001001000010110000001010001111100001110001001011100000100001110001110111000100111010001010100111011000100011111110110101001111100101011101001110011110110110000010101000110 1001101001011110001010011110111000010100100001011110110111011111000111001010101010011100001111011010101100100110100101000010110110011100100101011100100010110001000111010101001010110010110101000000001110000101010010000000110010111111101101010001010110010111011010110110000011010000001110011101101101000001001010000010010001011010100110110110101000110011100010011010000100101010101111011100011111101000 0000101101011101011010010011000110101101001010001010111101111100000101101001010111011101011110001100100011010101101110000001000010001011110001000110100100101110100010110010111110111011010101111010100101110110001101010100000111110101010110111110110111011110000111010000000010001010100100000000001111011010101100000111110011010001101010100111000011100111001011100100101100100101111010011101000010001101 0101100110111100110000111100010011000100001010001100011100100011100000101111111110001111010011100011010001010111010001111000101110100100101101011001101001000010111101000101101011000111000111010011000110000110001101101001111011110100111101100111000111000111101101101001010111000000100011101001011010101010110100011001111101000110101110001000010110101101111011001000000111110000111001010010001100011101 0111110000001011101100110010100111101100111010000111111111111101100111101111010101110010111110101101110100001000111110001110110010001010101001010011111001001000111000100001110010000110100100001000011001110001110000010001010101001101101101001100101011010010001011010011110100101001110001111100000001101011111101111011000000101100111101110010111100001010111111000100101110111101000110111010111010100001 0111111100010100010100100100110111011101111111101111011000001101100010110110111110101010010110000101011001001101110001010001001011100000110101000111100011011101001010011110111111001100011010001001011000010001100100001111000111101000101011010001011110000100011001100100110000010011100001001100010100000000101101000011111101100101111000100000001110000010101100010101000001100001001100110110010001100100 1110010000110111001011001110010111000100101000000110010110011100010011111100010000001100000001110101010010110101100000111001100100010100011111001001001011110110111011100010001110010100001001110011101010100001010001111100100111100100000010000000000011101111011111101011000101001010000011101110110101111110011101111011100101101110000000110100101000100010001001111111001000000000101111010011111100001010 0110010000110001000011001001011011001000100111100100000001101100100111011001111101011001011111011101111100001001000101110010111010010110101001011000101100000101001110111100110101010110011001000000111101100101000001011001110111010100010101010010101101001011001001011100000101000001101000000100111000101101101010011110110100110011100111011101111110111100111011101000001110001100100011100101010001100101 0010100100011010010111010000111000010111101111000001000011011101001010111010101110110101000110110101110111100000101111110101111011111001000100110110110111100011010000101000001011101111011111100110010001001100011110101000000000011011110100001000111101110111100001011000000101011001111110010110001011010101111011001011100000100001101110111010110110100111011001111000111101010100100001101011001000011100 0001000011001011100011110101100101010011011110001100001101101011111101000100101001011111100100011100100111010101101011011011010010101101010111010011111110110111110001001011000110101111010010010100011010010100001001100111111100101010010100000010001000101100001101111111101110100111100111111011111100100100000010110000011010110111110110101111101110001100000000100110011100111110001001010001101111010000 0110110110001101110100110000011100100011100110000101000000100110001011100110111101010100011111111000010010110000011100000011101010001111011111100011000001110111101001011110110011000010011000110001111110011011101101000000110010101000100011111001110110110000001011011110011011001111101101101001011110001000010110000011000000101110100110100010100010001010100010001101110011001001100011111101110110100101 0101000101100100010010101001100111010000111111011110100001011110100001100010001101010110111000110010011110101111001000010101000111110011000001101101011011000111010100100010010010001110001111001011101011000011110101110101001000111110000101111110101101100001010110011110011111000110010111111110110100001001001010010010001000000110101101011110111001111111010110000001000101001011001000000100111101100100 1101110000101100100001111111101010001000001111000010111100101000000100000100011011000010110010110100010110000001101011010001100100010001101001011110011000001000001011011010010011000001110001100011110000000011101011101101001100001000010111111100100001000110010111101110001110100100101001000001101111110110101001100011110110111011000001111110111010101010011010010001100011101000011110100111000101100000 1000100111001111001000000000010101110110100000011110010100010101011001000011111110111011101110000011101111010110001111011010110110101100001110001111000100011010001110100110100011111000011110100000101111011010000100010001100010101001101001100101100110010100101001010000000110010011111010010011111000001010110001011000000100111000011001110101000111000010000101000011100000011000101010101000100110001111 0001110110011011001100111100000010101001010100111011001010001010000100011011001011110011100100111111000001101100011000110100011011010000111111000010110110110101010100011010111100001101010011100101111101111111101001001011010000001000111100011110111000011110000101010101011101010001100100101001110111101100011110101001110011100010000001010000000110011100110000100111011111101000000100101010111000101000 1101000011101110000111101100111100110000101101011000000011000110011111001111110001111001110011101001111101110011101000001011011100100110111111101111011101111011000111110010010000110001100110111101100011100101101001110101001111100001000011010111110000110010010101110001110001100000100010110110110011101100010101001101001101100011000011111010010101011001111110111000111101111010101000111011111001100001 0101110000010000101001110000000000101001100010001110101000000100011101000101100101000111001100010111100010010011110100110010111110011100010011000011100111011110101101000011110001010000011010111001011101001000001100001111101000001010000100010110010011100111001001101001000101001110111010000000101100111001110000000010010111000011111001111010000111001010010111110101000001111110110100100010011110110000 0110011001000100011111000000010001100111111111111001001000001101001110110000111011101101011001111000011001001001111111111101000001011001111110000001110010010011100000100100010000111100001011010001010011000100010101001010101011011110000100000101100011100011011001101101111001010110110011000100110010001000001011001110010011100100001001101110001111100111000111100101101011000111111011001111100111110010
FX検証

【FX】MACDシグナルは有効か【サイン検証】

3/31/2022

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

MACDとシグナルラインのクロスで売買したときの勝率

本日はオシレータ系指標としてメジャーなMACDの検証してみたいと思います。

MACDの使い方はいろいろあり、実際は単体で売買判断することは少ないと思いますが、今回は単純にシグナルラインとのクロスで売買したときの単純に売買判断だけするとしたら勝率はどうなるのか見てみます。

 

MACDの設定

MACDの一パラメータは時間足問わず、長期サイクル26、短期サイクル12、シグナル期間9とするのが一般的だと思います。今回はこれで検証します。

 

エントリー条件

「値が0以下でMACDがシグナルを上抜いたら買い、0以上でMACDがシグナルを下抜いたら売り」とします。

また、エントリー後は値が0になるまでは次のエントリーをしないこととします。図にするとこんな感じ。

(連続エントリーをしないようにしてるのはMACDとシグナルが絡み合うような相場で一方向のポジションを積み上げてしまうのを防ぐためです。)

 

 

ストップロスは1時間足値幅の1~8倍、 テイクプロフィットはストップロスを元にリスクリワード比0.2~10を定めて設定します。

2012/01/01 ~ 2021/12/31 1時間足でエントリー ( 決済判断の価格データは1分足を使用)

 

結果

EURUSD

トレード回数 1413回

高RRR(損小利大トレード)

低RRR(損大利小トレード)

2本の線がほとんど重なっています。これは優位性無しとしてよさそうです。

 

GBPJPY

トレード回数 1389回

高RRR(損小利大トレード)

低RRR(損大利小トレード)

高RRRでは少し優位に見えますが、そもそもGBPJPYはランダムエントリーでも若干優位に見えるため、判定が難しいです。そのうちちゃんと比較したほうが良さそうですね。

低RRRではわずかではあるもののむしろ逆向きにズレてしまってます。誤差の範囲としたいところですが、SLTP設定に関わらずすべて同じ傾向があるのでなんらかの理由がありそうです。

AUDNZD

トレード回数 1452回

高RRR(損小利大トレード)

低RRR(損大利小トレード)

高RRRの結果はランダムエントリーとほぼ同じなので優位性なしとしていいでしょう。

低RRRについてはGBPJPY同様、理論勝率より低下しているという逆向きのズレが見られます。

 

考察とまとめ

少なくとも「MACD値が0以下でMACDがシグナルを上抜いたら買い、0以上でMACDがシグナルを下抜いたら売り」というエントリーは優位性があるとは言えない、としていいでしょう。

高RRRではランダムエントリーとだいたい同じ(GBPJPYではもしかしたら少し優位という程度)、低RRRではむしろGBPJPY, AUDNZDでは「上抜いたら『売り』、下抜いたら『買い』」のほうがいいのでは?と思わせるような結果が出ています。

 

なぜ逆の結果になったのか

MACDは「買われすぎ、売られすぎ」を見るオシレータ系指標の一つです。一般的にオシレータ系は強いトレンドが発生しているときは有効性が低いと考えられます。

MACDに限らずオシレータ系を使ってる方は、トレンド発生時に上や下に張り付いてしまっている状況を見たことがあるのではないでしょうか。

今回サインとみなした部分は「買われすぎ、売られすぎ(後の反転サイン)」と考えてエントリーしてるわけですが、これがトレンド発生時はただの「押し目」や「戻り」だったりするわけです。

そんなところでトレンドに対して逆張りエントリーしたら、そりゃ負けます。しかも押し(下がり)始めてから売り、戻り(上がり)始めてからの買いのため、そのあとエントリー方向(=トレンドと逆方向)に動く余地が少なく、勝率が理論値より低くなるのもなんとなくわかる気がします。

低RRRでは理論勝率が高いため、このあたりの影響が顕著にグラフにでているのかもしれません。

 

というわけで「MACDは相場状況を判断した上で利用しないと全く意味がない」ということを再認識した結果となりました。

システムトレードではオシレータ系指標はなんらかのトレンド判断指標と組み合わせることが多いと思いますが、この結果を見ればそれも納得です。

 


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

新しいコメント

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

cTrader's Life

© 2025 ajinori