Dear,
there should be some condition in n and m .
otherwise it will be a lot of possibilities to fulfill the condition.
1) only one person sits in first and rest m-1 sits in 2 row.
2) two person sit in first and rest m-2 sits in 2nd row.
3) three person sit in first and rest m-3 sits in 2nd row.
............and so on.
hence please clear the relation between m and n.