given array of fractions find if graction can be formed

given array of fraction, numerator & denominator arrays.
check if a fraction can be expressed using given fractions.

input –

n = [a,b,c,d]
d = [x,a,d,b]

check if x/d can be evaluated

output – yes