A started a business with Rs. 50000. After three months, B joins with an investment of Rs. 60000 and A withdraws Rs. 10000 out of his capital. Three months later, B brought in Rs. 20000 more. At the end of the year, what should be the ratio in which they A and B share the profits?