How do I make an AND input function?

In what way is it not working?