On an infinite two-dimensional frictionless plane, unit squares slide in the positive direction, while more unit square slide towards them in the other direction. When the unit squares collide, they will elastically rebound in the other direction with the same speed. Let be the number of squares that end up proceeding in the negative direction, while be the number of squares that end up proceeding in the positive direction. Find the value of when and .