import math


def dms(deg):
	"""Convert degree to degree-minute-second

	If deg is negative, all values of tuple are negative or 0.
	"""
	seconds = deg * 3600
	d = seconds / 3600
	m = math.fmod(seconds, 3600) / 60
	s = math.fmod(seconds, 60)
	return (int(d), int(m), s)