Sharad bought a table and a fan together for 5000. After some time he sold the table at the gain of 25% and the fan at a gain of20%. Thus he gained 23% on the whole. Find the cost of the fan.​