Text this: Prediction of the occurrence of flares in the solar cycle 24 from the evolution of magnetic polarity barycenters in active regions