Solution :

     
  From Fermat theorem :  
  , and
     

 Then,

Thus, , which implies the smallest  a = 63.