BAMO 2020 Problem 5

Let S be a set of a+b+3 points on a sphere, where a, b are nonnegative integers and no four points of S are coplanar (that is, no four points lie on a plane). Determine how many planes pass through three points of S and separate the remaining points into a points on one side of the plane and b points on the other side.