A Note on the Fermat Problem