Function returning pair for single values