import java.text.DecimalFormat

fun round(inp: Double): Double{
    val df: DecimalFormat = DecimalFormat("#####.##")
    val out = df.format(inp).toDouble()
    return out
}

class SpaceAge(val seconds: Long) {

    private fun ageOnEarth(): Double{
        return seconds.toDouble().div(31557600)
    }

    fun onEarth(): Double{
        return round(ageOnEarth())
    }

    fun onMercury(): Double{
        return round(ageOnEarth()/0.2408467)
    }

    fun onVenus(): Double{
        return round(ageOnEarth()/0.61519726)
    }

    fun onMars():Double{
        return round(ageOnEarth()/1.8808158)
    }

    fun onJupiter(): Double {
        return round(ageOnEarth()/11.862615)
    }

    fun onSaturn(): Double {
        return round(ageOnEarth()/29.447498)
    }

    fun onUranus(): Double {
        return round(ageOnEarth()/84.016846)
    }

    fun onNeptune(): Double {
        return round(ageOnEarth()/164.79132)
    }

}