Write primitive integers to int term format