I am having a hard time getting a nested if statement containing multiple and statements as listed below;

a1=7
a2=9

What i am looking for is;
If a1 is less than 15 and a2 is reater than 3 then give answer of 1
if a1 is less than 15 and a2 is greater than 5 then give answer of 2

Here is what i tried with no luck..

If(AND(a1<15,a2>3),1, if(and(a1,15,a2>5),2))

Can anybody help me with this?