Amphoterism

In chemistry, an amphoteric compound is a molecule or ion that can react both as an acid as well as a base. Many metals (such as copper, zinc, tin, lead, aluminium, and beryllium) form amphoteric oxides or hydroxides. Amphoterism depends on the oxidation states of the oxide. AlO is an example of an amphoteric oxide.

Question: can a compound be both an acid and a base
Answer: yes