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?

A4

B12

C36

D144