UNSW School Mathematics Competition Problems 2003

A cow is inside a square field. Its distances from the nearest three corners are 30m, 40m and 50m. What is its distance to the furthest corner, and what is the size of the field?