Search for pair production of first and second generation leptoquarks in proton-proton collisions at √s=8 TeV