You have a thousand Re. 1 coins with you. You have ten bags with you and you can put any number of coins in each of the bags. The condition is that if someone asks you for any amount between 1 and 1000, you must be able to give that amount by just giving the bag (you are not allowed to open the bag and give coins).
What is the four-digit number in which the first digit is one-third the second, the third is the sum of the first two, and the last is three times the second?