IF OR AND function

Hi
I would like help with placing brackets in right place and any other help on the below formula.
Example  ....... COL D contains numbers 1-12 and only numbers = 2,3 and 5 are of interest,
IF(OR(AND(D2=2,D2=3,D2=5),E2=1,F2=4,G2=5),99,0)
sample
D2 value = 2     E2 value = 1    F2 value = 4    G2  value = 5      returned value  = 99  all conditions fulfilled
D2 value = 1     E2 value = 1    F2 value = 4    G2  value = 5      returned value  = 0
D2 value = 2     E2 value = 4    F2 value = 4    G2  value = 5      returned value  = 0
D2 value = 3     E2 value = 1    F2 value = 4    G2  value = 5      returned value  = 99  all conditions fulfilled

Thanks
Ian
aikimark

membership
Create an account to see this answer
Signing up is free. No credit card required.
SOLUTION

membership
Create an account to see this answer
Signing up is free. No credit card required.

Thanks guys you were quick.
Works perfectly

It's worked perfectly at my end.
I ran it over 72,000 rows and carried out an independent check and it all matched.
Thanks
Sorry.
aikimark changed his comment several times while I was looking at it (but not having posted yet), and I had the original comment in view only.
The comment as posted works. Whether you prefer his or my formula is up to you - please reassign points as you see fit.