solved A with factor oracle