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



' version 15-08-2017
' compile with: fbc -s console
 
Dim As Integer fire, police, sanitation
 
Print "police fire sanitation"
Print "----------------------"
 
For police = 2 To 7 Step 2
    For fire = 1 To 7
        If fire = police Then Continue For
        sanitation = 12 - police - fire
        If sanitation = fire Or sanitation = police Then Continue For
        If sanitation >= 1 And sanitation <= 7 Then
            Print Using "   #     #       # "; police; fire; sanitation
        End If
    Next
Next
 
' empty keyboard buffer
While Inkey <> "" : Wend
Print : Print "hit any key to end program"
Sleep
End