m =[[0,0,0,1,0,1,0,1,0,1,0,0,0]] m << [0,0,1,0,1,0,1,0,1,0,1,0,0] m << [0,1,0,1,1,1,1,1,1,1,0,1,0] m << [1,0,1,1,1,1,1,1,1,1,1,0,1] m << [0,1,1,1,0,1,1,1,0,1,1,1,0] m << [1,0,1,1,1,1,1,1,1,1,1,0,1] m << [0,1,1,1,1,1,1,1,1,1,1,1,0] m << [1,0,1,1,1,1,1,1,1,1,1,0,1] m << [0,1,1,1,0,1,1,1,0,1,1,1,0] m << [1,0,1,1,1,1,1,1,1,1,1,0,1] m << [0,1,0,1,1,1,1,1,1,1,0,1,0] m << [0,0,1,0,1,0,1,0,1,0,1,0,0] m << [0,0,0,1,0,1,0,1,0,1,0,0,0] X,Y=gets.split.map(&:to_i) if -7