H2O is amphoteric so it can act as both a Bronsted acid or base at neutral conditions.
NH3 is a Bronsted-Lowry base at pH = 9 and below. It acts as an Bronsted-Lowry acid at pH's above 9. Since the question does not specify conditions, we should assume this to be at a neutral condition (pH = 7) which would make NH3 a base.