then is mass measured in kg or g.
Either will do but today's standard is the kilogram.
The scientific world uses the MKS system - metre, kilogram, second.
If you use the kilogram the force is measured in Newtons and the acceleration in metres per (second) 2
SI unit for mass is kilogram (kg), which is the same as 103 grams
1kg = 103 g.
I hope you didn't mean g as in acceleration due to gravity.
You need compatable units. If force is given in Newtons, acceleration should usually be given in meters per second squared. With these units of force and acceleration the value you get for the mass is in kilograms.
Separate names with a comma.