President tweeted Nasa should focus on ‘Mars (of which the Moon is a part)’ over going to the moon, a reversal of previous remarks