modified product pairs query