Three Partition Problems and an Application