this is question asked in one of competitive exams

Q)the subnet mask for a particular network is 255.255.31.0. which of the following pairs of IP addresses could belong to this network?

A) 172.57.88.62 and 172.56.87.233
B) 10.35.28.2 and 10.35.29.4
c) 191.203.31.87 and 191.234.31.88
D) 128.8.129.43 and 128.8.161.55

if anyone knows solution please let me know
thanks in advance