def freq(a):
	"""Determines the distinct elements in a list.
		 Returns a list of distinct elements and corresponding frequencies."""
	items = []
	for item in a:
		if not item in items:
			items.append(item)
	f = []
	for item in items:
		c = 0
		for elt in a:
			if item == elt:
				c += 1
		f.append(c)
	return items, f