AMC 10B 2021 Fall Problem 10

Fourty slips of paper numbered 1 to 40 are placed in a hat. Alice and Bob each draw one number from the hat without replacement, keeping their numbers hidden from each other. Alice says, “I can’t tell who has the larger number.” Then Bob says, “I know who has the larger number.” Alice says, “You do? Is your number prime?” Bob replies, “Yes.” Alice says, “In that case, if I multiply your number by 100 and add my number, the result is a perfect square.” What is the sum of the two numbers drawn from the hat?

Answer Choices
A. 27
B. 37
C. 47
D. 57
E. 67