A frame shop has been commissioned to frame \( 5 \) black-and-white photos for an island resort. Each photo has a perimeter of \( 98 \) in. and a diagonal of \( 35 \) in. Find the dimensions of the photos.
The longer side is \( \square \) in.
The shorter side is \( \square \) in.
(Type exact answers, using radicals as needed. Simplify your answers.)