One leg of a right triangle has a length of 3. The other sides have lengths that are consecutive integers. Find these lengths.