Search for pair production of first- and second-generation scalar leptoquarks in pp collisions at root s=7 TeV