A total of $731$ objects are put into $n$ nonempty bags where $n$ is a positive integer. These bags can be distributed into $17$ red boxes and also into $43$ blue boxes so that each red and each blue box contain $43$ and $17$ objects, respectively. Find the minimum value of $n$.