Solve MNNFP using spark