The sum of the three angles exceeds 180 degrees (40+80+90 (right angle)) so they can't form a triangle in flat space, but they could be angles in a triangle with curved sides, if the triangle were drawn on a curved surface like a sphere, for example.