It is fine to use generic acetaminophen or ibuprofen instead of a more expensive brand for pain and fever control.
A temperature above 100.4 F in a baby younger than 3 months old is an emergency and requires an immediate call to the doctor.
Infants’ acetaminophen dose chart
Infants’ ibuprofen dose chart (6 months and older only)
Children’s acetaminophen dose chart
Children’s ibuprofen dose chart