36c=3a+b
50c= 10a+b
So 14c=7a.
a=2c
So b=30c.
Suppose you need to line up x people.
2cx=2a+b=4c+30c=34c
So x= 17.