PID to control robot move in straight line!!!! urgent please

i am using 2 encoders to control the motor and move the motor in straight path but i cant able to run the motors on straight path due to the difference in speed in both the motors.
my encoder has total 20 slots.

please send a code to run both motors in straight path using encoders.

thanks in advance