Cell A1 has an X in it

Cell A2 has an X in it

Cell A3 has an X in it

Cell A4 has an X in it

Cell A5 has my formula

I want the formula to say if cell A1 and A2 have an X (A3 and A4 are blank), then return "Apple" in A5. If A1 and A3 have an X (A2 and A4 are blank), then return "Orange" in A5. If A1 and A4 have an X (A2 and A3 are blank), then return "Pear" in A5. If A1 is empty, then return blank in A5.