Thermodynamic phase stabilities of nanocarbon