How to get the value at each heatmap?

I want to get the value at idx=[1,2] in the first heatmap, and the value at idx=[3,4] in the second heatmap…
How can I write the code?

a = np.random.randn(5,64,64) # five heatmaps
b =[[1,2], [3,4], [5,6], [7,8], [8,9]]
[a[0,1,2], a[1,3,4], ..., a[4,8,9]]