George and Accommodation
George has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a dormitory.
George and Alex want to live in the same room. The dormitory has n n n rooms in total. At the moment the i i i-th room has p p pi people living in it and the room can accommodate q q qi people in total ( p p pi ≤