The diagram and the table above serve as guards in answering the above question.
X= 1 , Y= 0XY = 0NAND output = 1
Therefore Z = 1