One square grid is formed of 400 squares. Another square grid is formed of 256 squares. If the two grids join with a third at their vertices to form a right triangle, how many total squares could their be in the third grid?

A. 4

B. 12

C. 36

D. 144