The first line contains three integers n, m and k: the number of cities, the number of roads and the number of items (2≤n,m≤104, 1≤k≤18).
Each of the next m lines contains three integers ui, vi and li (1≤ui,vi≤104, 1≤li≤106), meaning there is a road of length li between city ui and city vi.
Each of the next k lines contains two integers fi and di (1≤fi,di≤104), meaning item i must be delivered from city fi to city di.