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__ eNrt2NFOhDAQheGZltb3f2NdohPxF5qTHC42YW7N5oN/aan78cybz+i5zVuFubXIFtHHjURGttdE tDHv6RTRajL81eZ4dToMqlk6cdJRrTqBMFdDJzCoZuhkrjbZyViNj+x61Gq1tDl6Nf2r8FVjJ3c1 Lm2dYTVLJ6HaZCd3tbG+CfF2hr0ViD601aETbZvC8+t9ikef0o51sSnPn/17AqkLwJcjdqr1FkTi d8rRQq/29zL/ReoNVO9D8Xmax4+eILUrSNXQaf/UGVLXxA9IndoaEaux0wqpSVQTOq0RpRo6rRHM sdrFjo4/CwifNXbCjqcjrLbupCOstu6kI2hz0UlCMq+qXXQSkOzHCKjGTjoS236ZJ9UWnQTktEb0 r7/1aBwdOf1ec0fShvA/ID9Cxopkn8fzSxqRmjyeZWdPO8Ij8wgbgqU361buQLAv+hEyfgSv+lsQ MlvaETK3rBPMeyMP8iAPMoiEGQneSZ3nTEjUu5VMWpAkQUZH8BK6nDo2iohA8DwnIiR0hohOkFGQ jD70X9ElJIpQZoIBwrOggSFCwsAQ4eKWptYnEQ9BhoiBwG5DJB0EfpYuRFt56voshISP+Ua8BLaB HeHi9jLb63UA4g3nmU/UNZX5