cvs: php-benchmarks /benchcli/tests test_whirl.php /benchcli/tests/phpWhirl 99bottles.wr AUTHORS COPYING keymaker.wr whirl.php
/benchcli/tests/phpWhirl/classes WhirlMathRing.php WhirlMemory.php WhirlOpsRing.php WhirlParser.php WhirlRing.php
| From: | Alexander Hjalmarsson | Date: | Tue, 02 Jun 2009 13:19:40 +0000 |
| Subject: | cvs: php-benchmarks /benchcli/tests test_whirl.php /benchcli/tests/phpWhirl 99bottles.wr AUTHORS COPYING keymaker.wr whirl.php /benchcli/tests/phpWhirl/classes WhirlMathRing.php WhirlMemory.php WhirlOpsRing.php WhirlParser.php WhirlRing.php |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-65053@lists.php.net to get a copy of this message | ||
hjalle Tue Jun 2 13:19:40 2009 UTC
Added files:
/php-benchmarks/benchcli/tests test_whirl.php
/php-benchmarks/benchcli/tests/phpWhirl 99bottles.wr AUTHORS
COPYING keymaker.wr
whirl.php
/php-benchmarks/benchcli/tests/phpWhirl/classes WhirlMathRing.php
WhirlMemory.php
WhirlOpsRing.php
WhirlParser.php
WhirlRing.php
Log:
Whirl parser test
http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/test_whirl.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/test_whirl.php +++ php-benchmarks/benchcli/tests/test_whirl.php <?php /** * Parses and runs the keymaker.wr program using * the php Whirl parser, made by Jakob Westhoff * <jakob@westhoffswelt.de> */ chdir("tests/phpWhirl/"); include_once("classes/WhirlParser.php"); $filename = "keymaker.wr"; try { $whirl = new WhirlParser(); $whirl->loadfile($filename); $whirl->parse(); } catch ( Exception $e ) { echo $e->getMessage(), "\n"; } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/99bottles.wr?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/99bottles.wr +++ php-benchmarks/benchcli/tests/phpWhirl/99bottles.wr 110001100111110001111001111100100000100011111000001111100010 000010001111100000111110001000001000111110000011111000100000 100011111000001111100010000010001111100000111110001000001000 111110000011111000100000100011111000001111100010000010001111 100000111110001000001000111110000011111000100000100011111000 001111100010000010001111100111100111000000010000111000001100 011100000000000000000000000000000000000000000000000001111100 111111000111110011100001110000011100000111000000000000000000 000000000000000110000111100011000111001111100000000000000000 000000000000000000000000000000011111000011000011111001111000 001110000011100111110001111001100000110000011000011111000111 100000111000001110011111000111100110000011000001100001111100 011110000011100000111001111100011110011000011111000111100000 111000001110011111000111100110000011000001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000011000001100000110000011000001100 000110000011000001100000110000011000001100000110000011000001 100000110000011000001100000110000111110001111000001110000011 100111110001111001100000110000011000011111000111100000111000 001110011111000111100110000111110001111000001110000011100111 110001111001100000110000011000001100000110000111110001111000 001110000011100111110001111001100000110000011000001100000110 000111110001111000001110000011100111110001111001100000110000 011000011111000111100000111000001110011111000111100110000011 000001100000110000011000001100000110000111110001111000001110 000011100111110001111001100001111100011110000011100000111001 111100011110011000001100000110000011000001100000110000011000 001100000110000011000001100001111100011110000011100000111001 111100011110011000001100000110000011000001100000110000011000 001100000110000011000001100001111100011110000011100000111001 111100011110011000001100000110000011000001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000011000001100001111100011110000011 100000111001111100011110011000001100000110000111110001111000 001110000011100111110001111001100000110000011000001100000110 000011000001100000110000011000011111000111100000111000001110 011111000111100110000011000001100000110000011000001100000110 000111110001111000001110000011100111110001111001100000110000 011000001100000110000011000001100001111100011110000011100000 111001111100011110011000001100000110000011000001100001111100 011110000011100000111001111100011110011000001100000110000111 110001111000001110000011100111110001111001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000111110001111000001110000011100111 110001111001100001111100011110000011100000111001111100011110 011000011111000111100000111000001110011111000111100110000111 110001111000001110000011100111110001111001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000111110001111000001110000011100111 110001111001100001111100011110000011100000111001111100011110 011000011111000111100000111000001110001111000011100111110001 111100011110001111100111110000011100000000000001110000000001 110000000000000000000000000110000011000111000001110011111100 011111000001111100111111000000000111000001110000000000000000 000000000000000000000000000001100000110001110000011100111111 000111110000011111001111110000000001110000011100000000011100 000111000000000000000000000000000000000000000001100000110001 110000011100111111000111110000011111001110000111000001110000 000001110000011100000000011100000000011100000000011100000000 000000000000100000111000001100011100000111001111110001111100 011110000100011111001000000001110000011100000000000000000000 000000000000000000000000000000000000000010000011100000110001 110000011100111111000111110000011111000111110011111001111000 001111000111110001000000001110000011100000111000001110000000 000000000000000000000000000000000000000000000000001100000110 011100000111001111110001111100000111110011100001110000000001 110000011100000000000000000000000000000001110000011100000111 110000011111000000000000000000000000000000100000111000001100 011100000111001111110001111100011110001111100111110000011100 000111000001110000000001110000011100000000000000000000000111 000001110000000001111100000111110001100000110001110000011100 111111000111110000011111001111110000000000000000000000000000 000000000000000000000000000000000000000000000110000011000000 000000000000000000000000000000000000000000011000001100000110 000011000111000001110011111100011111000111100011111001111100 000111000000000000000000000000000000000000000000011100000111 000000000111110000011111000000000001100000111000001110000011 000111000001110011111100011111000001111100111000000001110000 000001110000000001110000000000000000000000011100000111000000 000111110000011111000000000000000000000000000000011000001100 011100000111001111110001111100000111110011100001110000000000 000111000000000111000000000000000000000001110000011100000111 110000011111000110000011000001100000110000000000000000000000 000000000000000000000000000000000000000000011000001100011100 000111001111110001111100000111110011100001110000000000000000 000000000000000000000000000111000001110000000000000111110000 011111000000000000000110000011000111000001110011111100011111 000001111100111111000000000000011100000111000000000000000000 000000000000000000000000000110000011000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000011000001100011100000111 001111110001111100000111110011111100000000011100000111000001 110000000001110000000000000000000000011100000111000000000000 000001111100000111110001100000110001110000011100111111000111 110000011111001111110000011100000000011100000111000000000111 000000000000000000000001110000011100000111110000011111000000 000000000000000000000110000011000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000001100000000011000111000001110011111100 011111000111100011111001100000000000011100000000011100000000 000000000000000000011100000111000000000000000001111100000111 110000000000000000000000000000000000100000111000001100011100 000111001111110001111100000111110001111100111110011110000011 110001111100010000000011100000000011100000000000000000000000 000111000001110000000000000000000001111100000111110001100000 110001110000011100111111000111110000011111001111110000011100 000111000001110000011100000111000001110000000000000000000000 011100000111000000000000000000000111110000011111000000000001 100000110001110000011100111111000111110001111000111110011111 000001110000011100000111000001110000000001110000000000000000 000000011100000111000000000000000000000111110000011111000000 000000000000011000001100011100000111001111110001111100011110 001111100110000111000001110000000001110000000001110000000000 000000000000011100000111000001111100000111110000000000000000 000000000000000110000011000000000000000000000000000000000000 000000000000011000000000110000000000000000000000000000000000 000110000011000000000000000000000000000000000000000000000000 000001100000110000000000000110000011000111000001110011111100 011111000111100001000111110010000000001001111100011110000011 110001111100010000000000001110000011100000000000000000011100 000111000000000000000001111100000111110000000000000001100000 110000000000000000000000000000000000000000000000000000000000 000000000000000000011000001100011100000111001111110001111100 000111110011111100000000000010011111000111100000111100011111 000100000000111000001110000000000000000001110000011100000000 000000000000000001111100000111110000000000000000000000000000 000110000011000111000001110011111100011111000111100011111001 111100000111000000001001111100011110000011110001111100010000 000011100000111000000000000000000111000001110000000001111100 000111110000000000000001100000110000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000110000000001100011100000111 001111110001111100011110001111100110000000011100000111000001 110000000001110000000000000000000000011100000111000000000000 000000000000000001111100000111110000000000011000001100011100 000111001111110001111100000111110011111100000111000001110000 100111110001111000001111000111110001000000001110000011100000 000000000000011100000111000001111100000111110000000000000000 000110000000001100000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000011000001100 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000001100000110001110000011100111111000111110000011111 001111110000000000000000011100000111000000000000000000000000 000111000001110000011111000001111100000001100000110000000000 000000000000000000000000000000000000000000011000001100000000 011000001100000000000000000000000001100000110000000001100000 110000000000000110000011000000000000000000000000000000000000 000000000000000001100000110000000000000110000011000000000000 000000000110000011000000000000000001100000110000000001100000 110001110000011100111111000111110001111000111110011000000000 000000011100000000011100000000000000000000000111000001110000 000000000000011111000001111100000000000000000001100000110000 000000000000000000000000000001100000110000000000000000000000 000000000000000000000000000000000001100000110000000000000000 000000000110000011000111000001110011111100011111000001111100 111000011100000000100111110001111000001111000111110001000000 001110000011100000000000000000011100000111000000000000011111 000001111100000000000110000011000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000001100000110001110000011100111111000111 110001111000010001111100100000000000001001111100011110000011 110001111100010000000011100000111000000000000000000000000000 000000000000000000000000000000110000011000000000000011000001 100000000000000000000000000000000000000000000000001100000110 000000000000000000000000000000000000110000011000000000000000 000000000000000000000000000000000000000000000000000000000000 000000110000011000000000000000001100000110000000000000000000 000000000000000000000000000000000000001100000110011100000111 001111110001111100011110001111100110000111000001110000100111 110001111000001111000111110001000000001110000011100000000000 000000011100000111000000000000000000000000000001111100000111 110000000000000000000000000000000000011000001100011100000111 001111110001111100000111110001111100111110011110000011110001 111100010000000001000111110001111000001111000111110001000000 001110000011100000000000000000011100000111000000000000011111 000001111100000000000000000000000000000001100000110000000000 000000000000000000000000000000000000000000000000000000000000 000000000001100000110000000000000000000001100000110000000000 000000000000000000000000000000000000000000000001100000110001 110000011100111111000111110000011111001111110000011100000111 000000000111000000000111000000000000000000000001110000011100 000000000000000000000001111100000111110000000110000011000000 000000000000000000000000000000000000000000000000000000000000 000000011000001100011100000111001111110001111100000111110011 111100000111000000000111000001110000011100000000000000000000 000000011100000111000000000000000001111100000111110000000000 000000000000000000000110000011000000000000000000000000000000 000000000000000000000000000000000000000110000011000000000000 000000000000000000000000000000000000000000000000011000001100 011100000111001111110001111100000111110011100001110000011100 000111000000000000000000000000000000000000000001100000110000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 011000001100000000011000001100000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000001100000110001110000011100111111 000111110001111000111110011111000001110000000001110000011100 000111000001110000000000000000000000011100000111000000000000 000000000000000000000111110000011111000000000010000011100011 100011000111000001111100000111110000000000000000000000000111 110010100111110000011111000011111000001110000011100001110000 111100001111100000111000001110000011111000011100001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000011111000001111 100100001110000011000111001100111111100000111110000111110000 000011110000011110000111000001110000011111000011111000001111 100001111100000111000001110000011111000011100001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 011100000111000001111100001110000111100000111100000111100000 111100000111100000111100000111100000111100000111100000111100 000111100000111100000111100000111100000111100000111100000111 100000111100000111100000111100000111100000111100000111100000 111100000111100000111100000111100001110000011100000111110000 111100000111100001111100000111000001110000011111000011100001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000011111 000001111100010000111000001100011100110011111110000011111000 011111000000001111000001111000011100000111000001111100001111 100000111110000111110000011100000111000001111100001110000111 100000111100000111100000111100000111100000111100000111100000 111100000111100000111100000111100000111100000111100000111100 000111100000000111000001110000011111000011100001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000011100000111001111110011111000 111100001000011110000010011001001111100111000000000110000111 100000111100000110001110001100011111000011111000011111000000 001111000001111000001111000001111000011100000110000111110000 111110000011100000111000011100001111000011111000000000111000 001110000011111000001111000001111000001111100000111110000111 000011110000011110000011110000011110000011110000011110000011 110000011110000011110000011110000011110000011110000011110000 111000001110011111100111110001111000001001100011100111110000 000000000111000001110011000111110001100011111000111100000110 001110011001111111000001111100001111100000000111100000111100 001110000011100000111110000111110000011111000011111000001110 000011100000111110000111000011110000011110000011110000011110 000011110000011110000011110000011110000011110000011110000011 110000011110000011110000011110000011110000111000001110000011 111000011100001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000001111001111110001111100011110 000111110000010000111110000111111000010001000111100010011110 000100001111001111100011110001111100011110000011110000011100 111110001100011110000000001111000011100000111000001111100010 001111100011100000000011000000001111000001100011100111010011 1111100000111100 http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/keymaker.wr?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/keymaker.wr +++ php-benchmarks/benchcli/tests/phpWhirl/keymaker.wr 11000011111000011111110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011! 0000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001! 1001110001111111000111101001100001110000011100000111110000000001100111 00011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011! 1000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000! 1100111000111111100011110100111000011000001110000011111000000000110011 10001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001! 1100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000! 0110011100011111110001111010011100001100000111000001111100000000011001 11000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000! 0110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000! 0011001110001111111000111101001110000110000011100000111110000000001100 11100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000! 0111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000! 0001100111000111111100011110100111000011000001110000011111000000000110 01110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110! 0001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000! 0000110011100011111110001111010011000011100000111000001111100000000011 00111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111! 0000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000! 0000011001110001111111000111101001110000110000011100000111110000000001 10011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011! 1000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000! 0000001100111000111111100011110100110000111000001110000011111000000000 11001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001! 1000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100! 0000000110011100011111110001111010011100001100000111000001111100000000 01100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100! 1110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110! 0000000011001110001111111000111101001100001110000011100000111110000000 00110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010! 0110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111! 0000000001100111000111111100011110100110000111000001110000011111000000 00011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101! 0011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111! 1000000000110011100011111110001111010011000011100000111000001111100000 00001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110! 1001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111! 1100000000011001110001111111000111101001110000110000011100000111110000 00000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111! 0100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011! 1110000000001100111000111111100011110100111000011000001110000011111000 00000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111! 1010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001! 1111000000000110011100011111110001111010011100001100000111000001111100 00000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011! 1101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000! 1111100000000011001110001111111000111101001110000110000011100000111110 00000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001! 1110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000! 0111110000000001100111000111111100011110100110000111000001110000011111 00000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000! 1111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000! 0011111000000000110011100011111110001111010011000011100000111000001111 10000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100! 0111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100! 0001111100000000011001110001111111000111101001110000110000011100000111 11000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110! 0011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110! 0000111110000000001100111000111111100011110100111000011000001110000011 11100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111! 0001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111! 0000011111000000000110011100011111110001111010011000011100000111000001 11110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111! 1000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011! 1000001111100000000011001110001111111000111101001100001110000011100000 11111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111! 1100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001! 1100000111110000000001100111000111111100011110100111000011000001110000 01111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111! 1110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000! 1110000011111000000000110011100011111110001111010011100001100000111000 00111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111! 1111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000! 0111000001111100000000011001110001111111000111101001110000110000011100 00011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011! 1111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000! 0011100000111110000000001100111000111111100011110100111000011000001110 00001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001! 1111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100! 0001110000011111000000000110011100011111110001111010011100001100000111 00000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000! 1111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110! 0000111000001111100000000011001110001111111000111101001100001110000011 10000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100! 0111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011! 0000011100000111110000000001100111000111111100011110100111000011000001 11000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110! 0011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011! 1000001110000011111000000000110011100011111110001111010011000011100000 11100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111! 0001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000! 1100000111000001111100000000011001110001111111000111101001100001110000 01110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011! 1000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000! 1110000011100000111110000000001100111000111111100011110100111000011000 00111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001! 1100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100! 0011000001110000011111000000000110011100011111110001111010011100001100 00011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100! 1110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110! 0001100000111000001111100000000011001110001111111000111101001110000110 00001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110! 0111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110! 0001110000011100000111110000000001100111000111111100011110100111000011 00000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011! 0011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011! 0000111000001110000011111000000000110011100011111110001111010011000011 10000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001! 1001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001! 1100001100000111000001111100000000011001110001111111000111101001110000 11000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000! 1100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100! 1100001110000011100000111110000000001100111000111111100011110100110000 11100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000! 0110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010! 0110000111000001110000011111000000000110011100011111110001111010011100 00110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000! 0011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101! 0011100001100000111000001111100000000011001110001111111000111101001110 00011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000! 0001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110! 1001100001110000011100000111110000000001100111000111111100011110100110 00011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000! 0000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111! 0100111000011000001110000011111000000000110011100011111110001111010011 10000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000! 0000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111! 1010011000011100000111000001111100000000011001110001111111000111101001 10000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000! 0000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011! 1101001100001110000011100000111110000000001100111000111111100011110100 11100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100! 0000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001! 1110100111000011000001110000011111000000000110011100011111110001111010 01110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110! 0000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000! 1111010011100001100000111000001111100000000011001110001111111000111101 00111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111! 0000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100! 0111101001100001110000011100000111110000000001100111000111111100011110 10011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111! 1000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110! 0011110100111000011000001110000011111000000000110011100011111110001111 01001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111! 1100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111! 0001111010011100001100000111000001111100000000011001110001111111000111 10100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011! 1110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111! 1000111101001110000110000011100000111110000000001100111000111111100011 11010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001! 1111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111! 1100011110100110000111000001110000011111000000000110011100011111110001 11101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000! 1111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111! 1110001111010011100001100000111000001111100000000011001110001111111000 11110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000! 0111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111! 1111000111101001100001110000011100000111110000000001100111000111111100 01111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000! 0011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011! 1111100011110100110000111000001110000011111000000000110011100011111110 00111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100! 0001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011111000011111000000001111100001100000111000011110000000000000000111110000011111000000000000000000001111100001100000111000011110000000000000000111110000011111000000000000000000001100110000011101001100001111100001111100011110000111111000001! 0000011110000011100000111010011110000111000001100001110000011111000011 11100100001100000100001111100001111110000111100000111000001110100111100001110000011111000001111000001111000001111100001111100101101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000110100110000111000011111000000001100011000001111000001110100011000001111100001100000111000011110000000000000110001100000111100000111010001100000111100001110000111110000000011111000011000001110000111100000000000000000000111110000011111000000000000111110000110000011100001111000000000000000000001111100000111110000000000000000000011111000011000001110000111100000000000000000000000000000000000011111000001111100000000111110000110000011100001111000000001111100000111110000000000001111100001100000111000011110000000000001111100000111110000000000000000000000000000111110000110000011100001111000000000000111110000011111000000000000000011111000011000001110000111100001111100000111110000111110000110000011100001111000000000110011000001110100110000111110000111110010! 000011100000111100001000001000001100000000000000000110000011000001111100000111000011110000111100001111100000100001110100111100001100000111000001100000111000001111100000111000001110000011111000001111000001111000001111100001111100000000000000000000000000000000000000000000000000000000110000011110000111000001111100100000111000000000111100001000001000001100000000000001100000110000011111000001110000111100001111000011111000001000011101000111100001111000001100 http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/whirl.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/whirl.php +++ php-benchmarks/benchcli/tests/phpWhirl/whirl.php #!/usr/bin/php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("classes/WhirlParser.php"); echo "PHP Whirl Interpreter by Jakob Westhoff <jakob@westhoffswelt.de> V1.0","\n"; if ($argc < 2) { echo "Usage: ", $argv[0], " [-debug] Whirlfile.wrl", "\n"; die(); } if (!strcasecmp($argv[1], "-debug")) { define("DEBUG", true); $filename = $argv[2]; } else { $filename = $argv[1]; } echo "Loading and parsing the program...", "\n"; try { $whirl = new WhirlParser(); $whirl->loadfile($filename); $whirl->parse(); } catch ( Exception $e ) { echo $e->getMessage(), "\n"; } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMathRing.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMathRing.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMathRing.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("WhirlRing.php"); include_once("WhirlParser.php"); class WhirlMathRing extends WhirlRing { public function __construct() { parent::__construct(); } protected function initCommandsArray() { $this->_commands = array("Noop", "Load", "Store", "Add", "Mult", "Div", "Zero", "Less", "Greater", "Equal", "Not", "Neg"); } protected function RINGFUNC_Noop() { //simply do nothing here } protected function RINGFUNC_Load() { $this->_setValue(WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Store() { WhirlMemory::instance()->setValue($this->_getValue()); } protected function RINGFUNC_Add() { $this->_setValue($this->_getValue() + WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Mult() { $this->_setValue($this->_getValue() * WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Div() { $this->_setValue($this->_getValue() / WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Zero() { $this->_setValue(0); } protected function RINGFUNC_Less() { if ($this->_getValue() < WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } } protected function RINGFUNC_Greater() { if ($this->_getValue() > WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } } protected function RINGFUNC_Equal() { if ($this->_getValue() === WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } } protected function RINGFUNC_Not() { if ($this->_getValue() !== 0) { $this->_setValue(0); } else { $this->_setValue(1); } } protected function RINGFUNC_Neg() { $this->_setValue($this->_getValue() * -1); } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMemory.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMemory.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMemory.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ class WhirlMemory { private $_values; private $_position; private static $_instance; public function __construct() { $this->_init( ); if (!isset(self::$_instance)) { self::$_instance = $this; } else { throw new Exception("WhirlMemory is a Singleton, you can only instantiate one object of this class. Please use instance() instead."); } } private function _init( ) { $this->_values = array(0); $this->_position = 0; } public static function instance( ) { if (!isset(self::$_instance)) { self::$_instance = new WhirlMemory(); } return self::$_instance; } public function moveby( $count ) { $this->_position += $count; if ( $this->_position < 0 ) { throw new Exception("Error in instruction " . WhirlParser::instance()->getInstructionNumber() . ": Memory index out of bounds. The memory index was decreased beyond zero."); } if (!isset($this->_values[$this->_position])) { $this->_values[$this->_position] = 0; } } public function getValue( ) { //if(!isset($this->_values[$this->_position])) { // throw new Exception("Error in instruction " . WhirlParser::instance()->getInstructionNumber() . ": Memory at index " . $this->_position . " was not set before retrieval."); //} return $this->_values[$this->_position]; } public function setValue( $data ) { $this->_values[$this->_position] = $data; } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlOpsRing.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlOpsRing.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlOpsRing.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("WhirlRing.php"); include_once("WhirlParser.php"); class WhirlOpsRing extends WhirlRing { public function __construct() { parent::__construct(); } protected function initCommandsArray() { $this->_commands = array("Noop", "Exit", "One", "Zero", "Load", "Store", "PAdd", "DAdd", "Logic", "If", "IntIO", "AscIO"); } protected function RINGFUNC_Noop() { //simply do nothing here } protected function RINGFUNC_Exit() { WhirlParser::instance()->programExit(); } protected function RINGFUNC_One() { $this->_setValue(1); } protected function RINGFUNC_Zero() { $this->_setValue(0); } protected function RINGFUNC_Load() { $this->_setValue(WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Store() { WhirlMemory::instance()->setValue($this->_getValue()); } protected function RINGFUNC_PAdd() { WhirlParser::instance()->PAdd($this->_getValue()); } protected function RINGFUNC_DAdd() { WhirlMemory::instance()->moveby($this->_getValue()); } protected function RINGFUNC_Logic() { if (WhirlMemory::instance()->getValue() !== 0) { $this->_setValue((int)($this->_getValue() && 1)); } else { $this->_setValue(0); } } protected function RINGFUNC_If() { if ( WhirlMemory::instance()->getValue() !== 0) { WhirlParser::instance()->PAdd($this->_getValue()); } } protected function RINGFUNC_IntIO() { if ($this->_getValue() === 0) { WhirlMemory::instance()->setValue((int) WhirlParser::instance()->input()); } else { WhirlParser::instance()->output((int) WhirlMemory::instance()->getValue()); } } protected function RINGFUNC_AscIO() { if ($this->_getValue() === 0) { WhirlMemory::instance()->setValue((int) ord(WhirlParser::instance()->input())); } else { WhirlParser::instance()->output(chr(WhirlMemory::instance()->getValue())); } } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlParser.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlParser.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlParser.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("WhirlMemory.php"); include_once("WhirlOpsRing.php"); include_once("WhirlMathRing.php"); class WhirlParser { private $_LANGUAGE = array("0", "1"); private static $_instance; private $_WhirlMemory; private $_program; private $_currentPosition; private $_rings; private $_currentRing; public function __construct() { $this->_init( ); if (!isset(self::$_instance)) { self::$_instance = $this; } else { throw new Exception("WhirlParser is a Singleton, you can only instantiate one object of this class. Please use instance() instead."); } } private function _init() { $ringClasses = array("WhirlOpsRing", "WhirlMathRing"); $this->_WhirlMemory = WhirlMemory::instance(); $this->_program = array(); foreach ( $ringClasses as $ring ) { $this->_rings[] = new $ring; } $this->_currentRing = 0; $this->_currentPosition = 0; } public static function instance( ) { if (!isset(self::$_instance)) { self::$_instance = new WhirlParser(); } return self::$_instance; } private function _setNextRingActive() { $this->_currentRing++; if ($this->_currentRing > count($this->_rings) -1) { $this->_currentRing = 0; } if (defined('DEBUG')) echo "changed to ring: ", $this->_currentRing, "\n"; } private function _cleanCode( $code ) { //strip out everything which is not part of the LANGUAGE return preg_replace('/[^'.$this->_LANGUAGE[0].$this->_LANGUAGE[1].']/','', $code); } private function _prepareCode( $code ) { $preparedCode = array(); foreach (preg_split('//', $code) as $instruction) { if ($instruction === $this->_LANGUAGE[0]) { $preparedCode[] = false; } else if ($instruction === $this->_LANGUAGE[1]) { $preparedCode[] = true; } } return $preparedCode; } public function load ($code) { $this->_program = $this->_prepareCode( $this->_cleanCode( $code ) ); } public function loadFile( $filename ) { if (!file_exists($filename)) { throw new Exception("An Error occured while loading a source file: The file $filename does not exist."); } if (!is_readable($filename)) { throw new Exception("An Error occured while loading a source file: The file $filename is not readable."); } $this->_program = $this->_prepareCode( $this->_cleanCode( file_get_contents($filename) ) ); } public function parse() { if (count($this->_program) === 0) { throw new Exception("An Error occured while parsing: No program code has been supplied."); } if (defined('DEBUG')) { echo "Executing the following Code:\n"; foreach( $this->_program as $instruction ) { if ($instruction) echo $this->_LANGUAGE[1]; else echo $this->_LANGUAGE[0]; } echo "\n"; } //some variables we need during the loop $execute = false; //Enter main loop for parsing the file while ($this->_currentPosition < count($this->_program)) { if ($this->_program[$this->_currentPosition]) { //We have a 1 as instruction $this->_rings[$this->_currentRing]->rotate(); $execute = false; } else { //We have a 0 as instruction $this->_rings[$this->_currentRing]->reverseDirection(); if ($execute) { $this->_rings[$this->_currentRing]->execute(); $this->_setNextRingActive(); $execute = false; } else { $execute = true; } } $this->_currentPosition++; } //parsing is complete } public function programExit() { //jump to the end of the program $this->_currentPosition = count($this->_program); } public function PAdd($count) { //jump to the wanted program position -1, because the position counter will be incremented by one after the execution. $this->_currentPosition += $count -1; if ($this->_currentPosition < -1) { throw new Exception("Error in Instruction " . $this->getInstructionNumber() . ": Program position out of Bounds. The program position was decreased beyond zero."); } else if ($this->_currentPosition > count($this->_program)) { throw new Exception("Error in Instruction " . $this->getInstructionNumber() . ": Program position out of Bounds. The program position was increased beyond the end of file."); } } public function getInstructionNumber() { return $this->_currentPosition + 1; } public function input() { return trim(fgets(STDIN)); } public function output($output) { print($output); } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlRing.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlRing.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlRing.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ abstract class WhirlRing { private $_value; private $_position; private $_direction; protected $_commands; public function __construct() { $this->_init( ); $this->initCommandsArray(); } private function _init( ) { $this->_value = 0; $this->_position = 0; $this->_direction = 1; //forward } abstract protected function initCommandsArray(); protected function _setValue($value) { $this->_value = $value; } protected function _getValue() { return $this->_value; } public function reverseDirection() { if ($this->_direction === 1) { $this->_direction = -1; } else { $this->_direction = 1; } if (defined('DEBUG')) echo "reversed direction to: ", $this->_direction, "\n"; } public function rotate() { $this->_position += $this->_direction; if ($this->_position < 0) { $this->_position = count( $this->_commands ) - 1; } else if ($this->_position > count( $this->_commands ) - 1) { $this->_position = 0; } if (defined('DEBUG')) echo "rotated to: ", $this->_position, "\n"; } public function execute() { $functionToCall = "RINGFUNC_" . $this->_commands[$this->_position]; if (!method_exists($this, $functionToCall)) { throw new Exception("Ring Function could not be called, because it wasn't defined: $functionToCall undefined."); } call_user_func(array($this,$functionToCall)); if (defined('DEBUG')) echo "executed func: ", $functionToCall,", Value: ", $this->_value, "\n"; } } ?>
http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/test_whirl.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/test_whirl.php +++ php-benchmarks/benchcli/tests/test_whirl.php <?php /** * Parses and runs the keymaker.wr program using * the php Whirl parser, made by Jakob Westhoff * <jakob@westhoffswelt.de> */ chdir("tests/phpWhirl/"); include_once("classes/WhirlParser.php"); $filename = "keymaker.wr"; try { $whirl = new WhirlParser(); $whirl->loadfile($filename); $whirl->parse(); } catch ( Exception $e ) { echo $e->getMessage(), "\n"; } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/99bottles.wr?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/99bottles.wr +++ php-benchmarks/benchcli/tests/phpWhirl/99bottles.wr 110001100111110001111001111100100000100011111000001111100010 000010001111100000111110001000001000111110000011111000100000 100011111000001111100010000010001111100000111110001000001000 111110000011111000100000100011111000001111100010000010001111 100000111110001000001000111110000011111000100000100011111000 001111100010000010001111100111100111000000010000111000001100 011100000000000000000000000000000000000000000000000001111100 111111000111110011100001110000011100000111000000000000000000 000000000000000110000111100011000111001111100000000000000000 000000000000000000000000000000011111000011000011111001111000 001110000011100111110001111001100000110000011000011111000111 100000111000001110011111000111100110000011000001100001111100 011110000011100000111001111100011110011000011111000111100000 111000001110011111000111100110000011000001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000011000001100000110000011000001100 000110000011000001100000110000011000001100000110000011000001 100000110000011000001100000110000111110001111000001110000011 100111110001111001100000110000011000011111000111100000111000 001110011111000111100110000111110001111000001110000011100111 110001111001100000110000011000001100000110000111110001111000 001110000011100111110001111001100000110000011000001100000110 000111110001111000001110000011100111110001111001100000110000 011000011111000111100000111000001110011111000111100110000011 000001100000110000011000001100000110000111110001111000001110 000011100111110001111001100001111100011110000011100000111001 111100011110011000001100000110000011000001100000110000011000 001100000110000011000001100001111100011110000011100000111001 111100011110011000001100000110000011000001100000110000011000 001100000110000011000001100001111100011110000011100000111001 111100011110011000001100000110000011000001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000011000001100001111100011110000011 100000111001111100011110011000001100000110000111110001111000 001110000011100111110001111001100000110000011000001100000110 000011000001100000110000011000011111000111100000111000001110 011111000111100110000011000001100000110000011000001100000110 000111110001111000001110000011100111110001111001100000110000 011000001100000110000011000001100001111100011110000011100000 111001111100011110011000001100000110000011000001100001111100 011110000011100000111001111100011110011000001100000110000111 110001111000001110000011100111110001111001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000111110001111000001110000011100111 110001111001100001111100011110000011100000111001111100011110 011000011111000111100000111000001110011111000111100110000111 110001111000001110000011100111110001111001100001111100011110 000011100000111001111100011110011000011111000111100000111000 001110011111000111100110000111110001111000001110000011100111 110001111001100001111100011110000011100000111001111100011110 011000011111000111100000111000001110001111000011100111110001 111100011110001111100111110000011100000000000001110000000001 110000000000000000000000000110000011000111000001110011111100 011111000001111100111111000000000111000001110000000000000000 000000000000000000000000000001100000110001110000011100111111 000111110000011111001111110000000001110000011100000000011100 000111000000000000000000000000000000000000000001100000110001 110000011100111111000111110000011111001110000111000001110000 000001110000011100000000011100000000011100000000011100000000 000000000000100000111000001100011100000111001111110001111100 011110000100011111001000000001110000011100000000000000000000 000000000000000000000000000000000000000010000011100000110001 110000011100111111000111110000011111000111110011111001111000 001111000111110001000000001110000011100000111000001110000000 000000000000000000000000000000000000000000000000001100000110 011100000111001111110001111100000111110011100001110000000001 110000011100000000000000000000000000000001110000011100000111 110000011111000000000000000000000000000000100000111000001100 011100000111001111110001111100011110001111100111110000011100 000111000001110000000001110000011100000000000000000000000111 000001110000000001111100000111110001100000110001110000011100 111111000111110000011111001111110000000000000000000000000000 000000000000000000000000000000000000000000000110000011000000 000000000000000000000000000000000000000000011000001100000110 000011000111000001110011111100011111000111100011111001111100 000111000000000000000000000000000000000000000000011100000111 000000000111110000011111000000000001100000111000001110000011 000111000001110011111100011111000001111100111000000001110000 000001110000000001110000000000000000000000011100000111000000 000111110000011111000000000000000000000000000000011000001100 011100000111001111110001111100000111110011100001110000000000 000111000000000111000000000000000000000001110000011100000111 110000011111000110000011000001100000110000000000000000000000 000000000000000000000000000000000000000000011000001100011100 000111001111110001111100000111110011100001110000000000000000 000000000000000000000000000111000001110000000000000111110000 011111000000000000000110000011000111000001110011111100011111 000001111100111111000000000000011100000111000000000000000000 000000000000000000000000000110000011000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000011000001100011100000111 001111110001111100000111110011111100000000011100000111000001 110000000001110000000000000000000000011100000111000000000000 000001111100000111110001100000110001110000011100111111000111 110000011111001111110000011100000000011100000111000000000111 000000000000000000000001110000011100000111110000011111000000 000000000000000000000110000011000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000001100000000011000111000001110011111100 011111000111100011111001100000000000011100000000011100000000 000000000000000000011100000111000000000000000001111100000111 110000000000000000000000000000000000100000111000001100011100 000111001111110001111100000111110001111100111110011110000011 110001111100010000000011100000000011100000000000000000000000 000111000001110000000000000000000001111100000111110001100000 110001110000011100111111000111110000011111001111110000011100 000111000001110000011100000111000001110000000000000000000000 011100000111000000000000000000000111110000011111000000000001 100000110001110000011100111111000111110001111000111110011111 000001110000011100000111000001110000000001110000000000000000 000000011100000111000000000000000000000111110000011111000000 000000000000011000001100011100000111001111110001111100011110 001111100110000111000001110000000001110000000001110000000000 000000000000011100000111000001111100000111110000000000000000 000000000000000110000011000000000000000000000000000000000000 000000000000011000000000110000000000000000000000000000000000 000110000011000000000000000000000000000000000000000000000000 000001100000110000000000000110000011000111000001110011111100 011111000111100001000111110010000000001001111100011110000011 110001111100010000000000001110000011100000000000000000011100 000111000000000000000001111100000111110000000000000001100000 110000000000000000000000000000000000000000000000000000000000 000000000000000000011000001100011100000111001111110001111100 000111110011111100000000000010011111000111100000111100011111 000100000000111000001110000000000000000001110000011100000000 000000000000000001111100000111110000000000000000000000000000 000110000011000111000001110011111100011111000111100011111001 111100000111000000001001111100011110000011110001111100010000 000011100000111000000000000000000111000001110000000001111100 000111110000000000000001100000110000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000110000000001100011100000111 001111110001111100011110001111100110000000011100000111000001 110000000001110000000000000000000000011100000111000000000000 000000000000000001111100000111110000000000011000001100011100 000111001111110001111100000111110011111100000111000001110000 100111110001111000001111000111110001000000001110000011100000 000000000000011100000111000001111100000111110000000000000000 000110000000001100000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000011000001100 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000001100000110001110000011100111111000111110000011111 001111110000000000000000011100000111000000000000000000000000 000111000001110000011111000001111100000001100000110000000000 000000000000000000000000000000000000000000011000001100000000 011000001100000000000000000000000001100000110000000001100000 110000000000000110000011000000000000000000000000000000000000 000000000000000001100000110000000000000110000011000000000000 000000000110000011000000000000000001100000110000000001100000 110001110000011100111111000111110001111000111110011000000000 000000011100000000011100000000000000000000000111000001110000 000000000000011111000001111100000000000000000001100000110000 000000000000000000000000000001100000110000000000000000000000 000000000000000000000000000000000001100000110000000000000000 000000000110000011000111000001110011111100011111000001111100 111000011100000000100111110001111000001111000111110001000000 001110000011100000000000000000011100000111000000000000011111 000001111100000000000110000011000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000001100000110001110000011100111111000111 110001111000010001111100100000000000001001111100011110000011 110001111100010000000011100000111000000000000000000000000000 000000000000000000000000000000110000011000000000000011000001 100000000000000000000000000000000000000000000000001100000110 000000000000000000000000000000000000110000011000000000000000 000000000000000000000000000000000000000000000000000000000000 000000110000011000000000000000001100000110000000000000000000 000000000000000000000000000000000000001100000110011100000111 001111110001111100011110001111100110000111000001110000100111 110001111000001111000111110001000000001110000011100000000000 000000011100000111000000000000000000000000000001111100000111 110000000000000000000000000000000000011000001100011100000111 001111110001111100000111110001111100111110011110000011110001 111100010000000001000111110001111000001111000111110001000000 001110000011100000000000000000011100000111000000000000011111 000001111100000000000000000000000000000001100000110000000000 000000000000000000000000000000000000000000000000000000000000 000000000001100000110000000000000000000001100000110000000000 000000000000000000000000000000000000000000000001100000110001 110000011100111111000111110000011111001111110000011100000111 000000000111000000000111000000000000000000000001110000011100 000000000000000000000001111100000111110000000110000011000000 000000000000000000000000000000000000000000000000000000000000 000000011000001100011100000111001111110001111100000111110011 111100000111000000000111000001110000011100000000000000000000 000000011100000111000000000000000001111100000111110000000000 000000000000000000000110000011000000000000000000000000000000 000000000000000000000000000000000000000110000011000000000000 000000000000000000000000000000000000000000000000011000001100 011100000111001111110001111100000111110011100001110000011100 000111000000000000000000000000000000000000000001100000110000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 011000001100000000011000001100000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000001100000110001110000011100111111 000111110001111000111110011111000001110000000001110000011100 000111000001110000000000000000000000011100000111000000000000 000000000000000000000111110000011111000000000010000011100011 100011000111000001111100000111110000000000000000000000000111 110010100111110000011111000011111000001110000011100001110000 111100001111100000111000001110000011111000011100001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000011111000001111 100100001110000011000111001100111111100000111110000111110000 000011110000011110000111000001110000011111000011111000001111 100001111100000111000001110000011111000011100001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 011100000111000001111100001110000111100000111100000111100000 111100000111100000111100000111100000111100000111100000111100 000111100000111100000111100000111100000111100000111100000111 100000111100000111100000111100000111100000111100000111100000 111100000111100000111100000111100001110000011100000111110000 111100000111100001111100000111000001110000011111000011100001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000011111 000001111100010000111000001100011100110011111110000011111000 011111000000001111000001111000011100000111000001111100001111 100000111110000111110000011100000111000001111100001110000111 100000111100000111100000111100000111100000111100000111100000 111100000111100000111100000111100000111100000111100000111100 000111100000000111000001110000011111000011100001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000011100000111001111110011111000 111100001000011110000010011001001111100111000000000110000111 100000111100000110001110001100011111000011111000011111000000 001111000001111000001111000001111000011100000110000111110000 111110000011100000111000011100001111000011111000000000111000 001110000011111000001111000001111000001111100000111110000111 000011110000011110000011110000011110000011110000011110000011 110000011110000011110000011110000011110000011110000011110000 111000001110011111100111110001111000001001100011100111110000 000000000111000001110011000111110001100011111000111100000110 001110011001111111000001111100001111100000000111100000111100 001110000011100000111110000111110000011111000011111000001110 000011100000111110000111000011110000011110000011110000011110 000011110000011110000011110000011110000011110000011110000011 110000011110000011110000011110000011110000111000001110000011 111000011100001111000001111000001111000001111000001111000001 111000001111000001111000001111000001111000001111000001111000 001111000001111000001111000001111000001111000001111000001111 000001111000001111000001111000001111001111110001111100011110 000111110000010000111110000111111000010001000111100010011110 000100001111001111100011110001111100011110000011110000011100 111110001100011110000000001111000011100000111000001111100010 001111100011100000000011000000001111000001100011100111010011 1111100000111100 http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/keymaker.wr?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/keymaker.wr +++ php-benchmarks/benchcli/tests/phpWhirl/keymaker.wr 11000011111000011111110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011! 0000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001! 1001110001111111000111101001100001110000011100000111110000000001100111 00011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011! 1000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000! 1100111000111111100011110100111000011000001110000011111000000000110011 10001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001! 1100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000! 0110011100011111110001111010011100001100000111000001111100000000011001 11000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000! 0110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000! 0011001110001111111000111101001110000110000011100000111110000000001100 11100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000! 0111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000! 0001100111000111111100011110100111000011000001110000011111000000000110 01110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110! 0001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000! 0000110011100011111110001111010011000011100000111000001111100000000011 00111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111! 0000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000! 0000011001110001111111000111101001110000110000011100000111110000000001 10011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011! 1000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000! 0000001100111000111111100011110100110000111000001110000011111000000000 11001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001! 1000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100! 0000000110011100011111110001111010011100001100000111000001111100000000 01100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100! 1110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110! 0000000011001110001111111000111101001100001110000011100000111110000000 00110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010! 0110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111! 0000000001100111000111111100011110100110000111000001110000011111000000 00011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101! 0011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111! 1000000000110011100011111110001111010011000011100000111000001111100000 00001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110! 1001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111! 1100000000011001110001111111000111101001110000110000011100000111110000 00000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111! 0100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011! 1110000000001100111000111111100011110100111000011000001110000011111000 00000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111! 1010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001! 1111000000000110011100011111110001111010011100001100000111000001111100 00000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011! 1101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000! 1111100000000011001110001111111000111101001110000110000011100000111110 00000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001! 1110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000! 0111110000000001100111000111111100011110100110000111000001110000011111 00000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000! 1111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000! 0011111000000000110011100011111110001111010011000011100000111000001111 10000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100! 0111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100! 0001111100000000011001110001111111000111101001110000110000011100000111 11000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110! 0011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110! 0000111110000000001100111000111111100011110100111000011000001110000011 11100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111! 0001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111! 0000011111000000000110011100011111110001111010011000011100000111000001 11110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111! 1000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011! 1000001111100000000011001110001111111000111101001100001110000011100000 11111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111! 1100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001! 1100000111110000000001100111000111111100011110100111000011000001110000 01111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111! 1110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000! 1110000011111000000000110011100011111110001111010011100001100000111000 00111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111! 1111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000! 0111000001111100000000011001110001111111000111101001110000110000011100 00011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011! 1111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000! 0011100000111110000000001100111000111111100011110100111000011000001110 00001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001! 1111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100! 0001110000011111000000000110011100011111110001111010011100001100000111 00000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000! 1111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110! 0000111000001111100000000011001110001111111000111101001100001110000011 10000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100! 0111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011! 0000011100000111110000000001100111000111111100011110100111000011000001 11000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110! 0011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011! 1000001110000011111000000000110011100011111110001111010011000011100000 11100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111! 0001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000! 1100000111000001111100000000011001110001111111000111101001100001110000 01110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011! 1000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000! 1110000011100000111110000000001100111000111111100011110100111000011000 00111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001! 1100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100! 0011000001110000011111000000000110011100011111110001111010011100001100 00011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100! 1110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110! 0001100000111000001111100000000011001110001111111000111101001110000110 00001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110! 0111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110! 0001110000011100000111110000000001100111000111111100011110100111000011 00000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011! 0011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011! 0000111000001110000011111000000000110011100011111110001111010011000011 10000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001! 1001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001! 1100001100000111000001111100000000011001110001111111000111101001110000 11000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000! 1100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100! 1100001110000011100000111110000000001100111000111111100011110100110000 11100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000! 0110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010! 0110000111000001110000011111000000000110011100011111110001111010011100 00110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000! 0011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101! 0011100001100000111000001111100000000011001110001111111000111101001110 00011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000! 0001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110! 1001100001110000011100000111110000000001100111000111111100011110100110 00011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000! 0000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111! 0100111000011000001110000011111000000000110011100011111110001111010011 10000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000! 0000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111! 1010011000011100000111000001111100000000011001110001111111000111101001 10000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000! 0000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011! 1101001100001110000011100000111110000000001100111000111111100011110100 11100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100! 0000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001! 1110100111000011000001110000011111000000000110011100011111110001111010 01110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110! 0000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000! 1111010011100001100000111000001111100000000011001110001111111000111101 00111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111! 0000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100! 0111101001100001110000011100000111110000000001100111000111111100011110 10011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111! 1000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110! 0011110100111000011000001110000011111000000000110011100011111110001111 01001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111! 1100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111! 0001111010011100001100000111000001111100000000011001110001111111000111 10100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011! 1110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111! 1000111101001110000110000011100000111110000000001100111000111111100011 11010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001! 1111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111! 1100011110100110000111000001110000011111000000000110011100011111110001 11101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000! 1111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111! 1110001111010011100001100000111000001111100000000011001110001111111000 11110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000! 0111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111! 1111000111101001100001110000011100000111110000000001100111000111111100 01111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000! 0011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011! 1111100011110100110000111000001110000011111000000000110011100011111110 00111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001100001110000011100! 0001111100000000011001110001111111000111101001100001110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011100001100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100110000111000001110000011111000000000110011100011111110001111010011000011100000111000001111100000000011001110001111111000111101001110000110000011100000111110000000001100111000111111100011110100111000011000001110000011111000000000110011100011111110001111010011111000011111000000001111100001100000111000011110000000000000000111110000011111000000000000000000001111100001100000111000011110000000000000000111110000011111000000000000000000001100110000011101001100001111100001111100011110000111111000001! 0000011110000011100000111010011110000111000001100001110000011111000011 11100100001100000100001111100001111110000111100000111000001110100111100001110000011111000001111000001111000001111100001111100101101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000110100110000111000011111000000001100011000001111000001110100011000001111100001100000111000011110000000000000110001100000111100000111010001100000111100001110000111110000000011111000011000001110000111100000000000000000000111110000011111000000000000111110000110000011100001111000000000000000000001111100000111110000000000000000000011111000011000001110000111100000000000000000000000000000000000011111000001111100000000111110000110000011100001111000000001111100000111110000000000001111100001100000111000011110000000000001111100000111110000000000000000000000000000111110000110000011100001111000000000000111110000011111000000000000000011111000011000001110000111100001111100000111110000111110000110000011100001111000000000110011000001110100110000111110000111110010! 000011100000111100001000001000001100000000000000000110000011000001111100000111000011110000111100001111100000100001110100111100001100000111000001100000111000001111100000111000001110000011111000001111000001111000001111100001111100000000000000000000000000000000000000000000000000000000110000011110000111000001111100100000111000000000111100001000001000001100000000000001100000110000011111000001110000111100001111000011111000001000011101000111100001111000001100 http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/whirl.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/whirl.php +++ php-benchmarks/benchcli/tests/phpWhirl/whirl.php #!/usr/bin/php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("classes/WhirlParser.php"); echo "PHP Whirl Interpreter by Jakob Westhoff <jakob@westhoffswelt.de> V1.0","\n"; if ($argc < 2) { echo "Usage: ", $argv[0], " [-debug] Whirlfile.wrl", "\n"; die(); } if (!strcasecmp($argv[1], "-debug")) { define("DEBUG", true); $filename = $argv[2]; } else { $filename = $argv[1]; } echo "Loading and parsing the program...", "\n"; try { $whirl = new WhirlParser(); $whirl->loadfile($filename); $whirl->parse(); } catch ( Exception $e ) { echo $e->getMessage(), "\n"; } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMathRing.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMathRing.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMathRing.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("WhirlRing.php"); include_once("WhirlParser.php"); class WhirlMathRing extends WhirlRing { public function __construct() { parent::__construct(); } protected function initCommandsArray() { $this->_commands = array("Noop", "Load", "Store", "Add", "Mult", "Div", "Zero", "Less", "Greater", "Equal", "Not", "Neg"); } protected function RINGFUNC_Noop() { //simply do nothing here } protected function RINGFUNC_Load() { $this->_setValue(WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Store() { WhirlMemory::instance()->setValue($this->_getValue()); } protected function RINGFUNC_Add() { $this->_setValue($this->_getValue() + WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Mult() { $this->_setValue($this->_getValue() * WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Div() { $this->_setValue($this->_getValue() / WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Zero() { $this->_setValue(0); } protected function RINGFUNC_Less() { if ($this->_getValue() < WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } } protected function RINGFUNC_Greater() { if ($this->_getValue() > WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } } protected function RINGFUNC_Equal() { if ($this->_getValue() === WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } } protected function RINGFUNC_Not() { if ($this->_getValue() !== 0) { $this->_setValue(0); } else { $this->_setValue(1); } } protected function RINGFUNC_Neg() { $this->_setValue($this->_getValue() * -1); } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMemory.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMemory.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlMemory.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ class WhirlMemory { private $_values; private $_position; private static $_instance; public function __construct() { $this->_init( ); if (!isset(self::$_instance)) { self::$_instance = $this; } else { throw new Exception("WhirlMemory is a Singleton, you can only instantiate one object of this class. Please use instance() instead."); } } private function _init( ) { $this->_values = array(0); $this->_position = 0; } public static function instance( ) { if (!isset(self::$_instance)) { self::$_instance = new WhirlMemory(); } return self::$_instance; } public function moveby( $count ) { $this->_position += $count; if ( $this->_position < 0 ) { throw new Exception("Error in instruction " . WhirlParser::instance()->getInstructionNumber() . ": Memory index out of bounds. The memory index was decreased beyond zero."); } if (!isset($this->_values[$this->_position])) { $this->_values[$this->_position] = 0; } } public function getValue( ) { //if(!isset($this->_values[$this->_position])) { // throw new Exception("Error in instruction " . WhirlParser::instance()->getInstructionNumber() . ": Memory at index " . $this->_position . " was not set before retrieval."); //} return $this->_values[$this->_position]; } public function setValue( $data ) { $this->_values[$this->_position] = $data; } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlOpsRing.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlOpsRing.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlOpsRing.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("WhirlRing.php"); include_once("WhirlParser.php"); class WhirlOpsRing extends WhirlRing { public function __construct() { parent::__construct(); } protected function initCommandsArray() { $this->_commands = array("Noop", "Exit", "One", "Zero", "Load", "Store", "PAdd", "DAdd", "Logic", "If", "IntIO", "AscIO"); } protected function RINGFUNC_Noop() { //simply do nothing here } protected function RINGFUNC_Exit() { WhirlParser::instance()->programExit(); } protected function RINGFUNC_One() { $this->_setValue(1); } protected function RINGFUNC_Zero() { $this->_setValue(0); } protected function RINGFUNC_Load() { $this->_setValue(WhirlMemory::instance()->getValue()); } protected function RINGFUNC_Store() { WhirlMemory::instance()->setValue($this->_getValue()); } protected function RINGFUNC_PAdd() { WhirlParser::instance()->PAdd($this->_getValue()); } protected function RINGFUNC_DAdd() { WhirlMemory::instance()->moveby($this->_getValue()); } protected function RINGFUNC_Logic() { if (WhirlMemory::instance()->getValue() !== 0) { $this->_setValue((int)($this->_getValue() && 1)); } else { $this->_setValue(0); } } protected function RINGFUNC_If() { if ( WhirlMemory::instance()->getValue() !== 0) { WhirlParser::instance()->PAdd($this->_getValue()); } } protected function RINGFUNC_IntIO() { if ($this->_getValue() === 0) { WhirlMemory::instance()->setValue((int) WhirlParser::instance()->input()); } else { WhirlParser::instance()->output((int) WhirlMemory::instance()->getValue()); } } protected function RINGFUNC_AscIO() { if ($this->_getValue() === 0) { WhirlMemory::instance()->setValue((int) ord(WhirlParser::instance()->input())); } else { WhirlParser::instance()->output(chr(WhirlMemory::instance()->getValue())); } } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlParser.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlParser.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlParser.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ include_once("WhirlMemory.php"); include_once("WhirlOpsRing.php"); include_once("WhirlMathRing.php"); class WhirlParser { private $_LANGUAGE = array("0", "1"); private static $_instance; private $_WhirlMemory; private $_program; private $_currentPosition; private $_rings; private $_currentRing; public function __construct() { $this->_init( ); if (!isset(self::$_instance)) { self::$_instance = $this; } else { throw new Exception("WhirlParser is a Singleton, you can only instantiate one object of this class. Please use instance() instead."); } } private function _init() { $ringClasses = array("WhirlOpsRing", "WhirlMathRing"); $this->_WhirlMemory = WhirlMemory::instance(); $this->_program = array(); foreach ( $ringClasses as $ring ) { $this->_rings[] = new $ring; } $this->_currentRing = 0; $this->_currentPosition = 0; } public static function instance( ) { if (!isset(self::$_instance)) { self::$_instance = new WhirlParser(); } return self::$_instance; } private function _setNextRingActive() { $this->_currentRing++; if ($this->_currentRing > count($this->_rings) -1) { $this->_currentRing = 0; } if (defined('DEBUG')) echo "changed to ring: ", $this->_currentRing, "\n"; } private function _cleanCode( $code ) { //strip out everything which is not part of the LANGUAGE return preg_replace('/[^'.$this->_LANGUAGE[0].$this->_LANGUAGE[1].']/','', $code); } private function _prepareCode( $code ) { $preparedCode = array(); foreach (preg_split('//', $code) as $instruction) { if ($instruction === $this->_LANGUAGE[0]) { $preparedCode[] = false; } else if ($instruction === $this->_LANGUAGE[1]) { $preparedCode[] = true; } } return $preparedCode; } public function load ($code) { $this->_program = $this->_prepareCode( $this->_cleanCode( $code ) ); } public function loadFile( $filename ) { if (!file_exists($filename)) { throw new Exception("An Error occured while loading a source file: The file $filename does not exist."); } if (!is_readable($filename)) { throw new Exception("An Error occured while loading a source file: The file $filename is not readable."); } $this->_program = $this->_prepareCode( $this->_cleanCode( file_get_contents($filename) ) ); } public function parse() { if (count($this->_program) === 0) { throw new Exception("An Error occured while parsing: No program code has been supplied."); } if (defined('DEBUG')) { echo "Executing the following Code:\n"; foreach( $this->_program as $instruction ) { if ($instruction) echo $this->_LANGUAGE[1]; else echo $this->_LANGUAGE[0]; } echo "\n"; } //some variables we need during the loop $execute = false; //Enter main loop for parsing the file while ($this->_currentPosition < count($this->_program)) { if ($this->_program[$this->_currentPosition]) { //We have a 1 as instruction $this->_rings[$this->_currentRing]->rotate(); $execute = false; } else { //We have a 0 as instruction $this->_rings[$this->_currentRing]->reverseDirection(); if ($execute) { $this->_rings[$this->_currentRing]->execute(); $this->_setNextRingActive(); $execute = false; } else { $execute = true; } } $this->_currentPosition++; } //parsing is complete } public function programExit() { //jump to the end of the program $this->_currentPosition = count($this->_program); } public function PAdd($count) { //jump to the wanted program position -1, because the position counter will be incremented by one after the execution. $this->_currentPosition += $count -1; if ($this->_currentPosition < -1) { throw new Exception("Error in Instruction " . $this->getInstructionNumber() . ": Program position out of Bounds. The program position was decreased beyond zero."); } else if ($this->_currentPosition > count($this->_program)) { throw new Exception("Error in Instruction " . $this->getInstructionNumber() . ": Program position out of Bounds. The program position was increased beyond the end of file."); } } public function getInstructionNumber() { return $this->_currentPosition + 1; } public function input() { return trim(fgets(STDIN)); } public function output($output) { print($output); } } ?> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlRing.php?view=markup&rev=1.1 Index: php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlRing.php +++ php-benchmarks/benchcli/tests/phpWhirl/classes/WhirlRing.php <?php /*** * * PhpWhirl - A Whirl Interpreter written in PHP * Copyright (C) 2005 Jakob Westhoff - http://www.WesthoffsWelt.de (German) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * You may contact the author by mail: * jakob@westhoffswelt.de * * Or write to: * Jakob Westhoff * Kleiner Floraweg 35 * 44229 Dortmund * Germany * * The latest version of PhpWhirl can be obtained from: * http://www.westhoffswelt.de/ * **/ abstract class WhirlRing { private $_value; private $_position; private $_direction; protected $_commands; public function __construct() { $this->_init( ); $this->initCommandsArray(); } private function _init( ) { $this->_value = 0; $this->_position = 0; $this->_direction = 1; //forward } abstract protected function initCommandsArray(); protected function _setValue($value) { $this->_value = $value; } protected function _getValue() { return $this->_value; } public function reverseDirection() { if ($this->_direction === 1) { $this->_direction = -1; } else { $this->_direction = 1; } if (defined('DEBUG')) echo "reversed direction to: ", $this->_direction, "\n"; } public function rotate() { $this->_position += $this->_direction; if ($this->_position < 0) { $this->_position = count( $this->_commands ) - 1; } else if ($this->_position > count( $this->_commands ) - 1) { $this->_position = 0; } if (defined('DEBUG')) echo "rotated to: ", $this->_position, "\n"; } public function execute() { $functionToCall = "RINGFUNC_" . $this->_commands[$this->_position]; if (!method_exists($this, $functionToCall)) { throw new Exception("Ring Function could not be called, because it wasn't defined: $functionToCall undefined."); } call_user_func(array($this,$functionToCall)); if (defined('DEBUG')) echo "executed func: ", $functionToCall,", Value: ", $this->_value, "\n"; } } ?>