The average apartment rent in country A is $1340 per month. Jacob has an apartment in city B and one in city C. The total monthly rent for the two apartments is $4958. The rent in city B is $1166 less than the rent in city C. Find the rent for each apartment.