Here is similar problem like your query I hope it will be helpful .
Q;A number x is selected at random from the numbers 1,2,3 and 4. Another number y is selected at random from the number y is selected at random from the numbers 1,4,9 and 16. Find the probability that product of x and y is less than 16
Let S be the sample space.
S = {(1,1); (1,4); (1,9); (1,16); (2,1); (2,4); (2,9); (2,16); (3,1); (3,4); (3,9); (3,16); (4, 1); (4,4); (4,9); (4,16)}
Here first member of each ordered pair shows the number selected from x and second member shows the number selected from y.
n(S) = 16
Let E be the event that product selected is less than 16.
E = {(1,1);(1,4); (1,9);(2,1); (2,4);(3,1); (3,4); (4,1)}
n(E) = 8
P(E) = n(E)/n(S) = 8/16 = 1/2
Hope this would clear your doubt.