This is your formula

=IF(AD3=0,"",IF(AND(AE3=1,AD3=5),"Perfect",IF(AND(AD3<5,AE3=1),"S Perfect",IF(AND(AD3<5,AE3<>1),"-"))))