Decode A and B values