5. A traveler arrived on an island inhabited by liars (L) and truth-tellers (P). Each L, when asked a question "How many..?", gives a number that is 2 more or 2 less than the correct answer, while each P answers correctly. The traveler met two residents of the island and asked each how many L and P live on the island. The first answered: "If you don't count me, there are 1001 L and 1002 P," and the second: "If you don't count me, there are 1000 L and 999 P." How many L and P are on the island? Who are the first and second residents of the island?