A submarine is 309 m horizontally out from the shore and 149 m beneath the surface of the water. A laser beam is sent from the sub so that it strikes the surface of the water at a point 249 m from the shore. If the beam just strikes the top of a building standing directly at the water's edge, find the height of the building.