require'zlib';m=Zlib.inflate(DATA.read.unpack('m')[0]).bytes;w=101;h=89;gets;$<.map{|l|y,x=l.split.map &:to_i;p m[y*w+x]*96} __END__ eNrt2dGN2zAQRdEpZUphKSxFpbCUKWVLSSwkD2GsZ+EC5IcBza9hHOlapLTan2e+fEbPo7YKdbTI FtHHRiIj22si2qg9nSKaJmN9tRqvTvOwaqDTPLmkmjrNxPJq6mQZVA10WlitbCdQDVyy90OraWmj AdXAT8GrgU6gGljalFG1tZ1AteKdaLVxfxLwdAZvRYk++OpgRDtq7fULruLRi+5YblOuv/t3vSE6 gPnH4Z203uIC+TflaMGr/X+Yl4juQLofwuup5q8aRLsCraYI2pcsomOav4A7tXsEVDOdbhBNztVA J4DcV3OdAHLOXM3v6PqYI/5aUye/4xHEVfOdMGKq+U4cMW18J4ZkfqzmOwEke4/w1XwngsRxHqav 5jshxNaI/vuz7k+CIeZ480RyGaK/gDYjYtYj2Wt+fskNSMv5WbZ6bkC09PTZckRLr3QqCxG/L+5D xGxEdKvfi4g5ch8iZv068fMgD/Ig34qMdyQWIxF1+WplIaJ7K3iDw5AUARiA6Cb0afTYCBBG6HmO IJwQQxBOiMFIRh/8LTpCAhN6ueoR/yzIGYMAgjJC3OLmo/VpEEAQRgggCJMXSAIC/NNGCFp5bH0K IQRn/iCMwNvAibDFzZnjdTsYP98/z/wCR2fADw==