ab, input and vector