Cotton prices gain in US, China, helped by stocks, sowings ideas