There is a highly organized city that has decided to assign a number to each of their departments:

   police department
   sanitation department
   fire department 


Each department can have a number between   1   and   7   (inclusive).

The three department numbers are to be unique (different from each other) and must add up to   12.

The Chief of the Police doesn't like odd numbers and wants to have an even number for his department.



Task

Write a computer program which outputs all valid combinations.



Possible output   (for the 1st and 14th solutions):

 --police--  --sanitation--  --fire-- 
     2             3            7 
     6             5            1



	org	100h
	lxi	h,obuf	; HL = output buffer
	mvi	b,2	; B = police
pol:	mvi	c,1	; C = sanitation
san:	mvi	d,1	; D = fire
fire:	mov	a,b	; Fire equal to police?
	cmp	d
	jz	next	; If so, invalid combination
	mov	a,c	; Fire equal to sanitation?
	cmp	d
	jz	next	; If so, invalid combination
	mov	a,b	; Total equal to 12?
	add	c
	add	d
	cpi	12
	jnz	next	; If not, invalid combination	
	mov	a,b	; Combination is valid, add to output
	call	num
	mov	a,c
	call 	num
	mov	a,d
	call	num
	mvi	m,13	; Add a newline to the output
	inx	h
	mvi	m,10
	inx	h
next:	mvi	a,7	; Load 7 to compare to
	inr	d	; Next fire number
	cmp	d	; Reached the end?
	jnc	fire	; If not, next fire number
	inr	c	; Otherwise, next sanitation number
	cmp	c	; Reached the end?
	jnc	san	; If not, next sanitation number
	inr	b	; Increment police number twice
	inr	b	; (twice, because it must be even)
	cmp	b	; Reached the end?
	jnc	pol 	; If not, next police number
	mvi	m,'$'	; If so, we're done - add CP/M string terminator
	mvi	c,9	; Print the output string
	lxi	d,ohdr
	jmp	5
num:	adi	'0'	; Add number A and space to the output
	mov	m,a
	inx	h
	mvi	m,' '
	inx	h
	ret
ohdr:	db	'P S F',13,10
obuf:	equ	$	; Output buffer goes after program