403753: GYM101257 E Another Step-by-Step Pupil
Description
Hamza is a new intern at Mixed Dimensions, and he's learning the basics about 3D models. Hasan gave him an easy task on his first day, he has to count the number of boundary edges in a 3D mesh.
A boundary edge in a 3D mesh is an edge that is a part of only one triangle. Hamza got so confused, and asked Hasan to simplify the problem. Hasan decided to give him only two triangles. But he still can’t figure it out. Given the names of the vertices that make up the two triangles, can you help Hamza find the number of boundary edges in the two triangles?
InputThe input consists of two lines, each line describes one triangle, and contains 3 distinct integers from 1 to 6 which represent the names of the vertices of each triangle. It is guaranteed that the two triangles are different by at least one vertex.
OutputPrint one integer, the number of boundary edges in the two given triangles.
ExamplesInput3 5 2Output
3 1 2
4Input
6 1 4Output
5 2 3
6Note
The first sample results in the following 2 triangles with 4 boundary edges (in green):