I am trying to change my ceiling lamp to ceiling lamp with fan. However, when I took the ceiling lamp off, I see that the cables have the same color so I have no way differentiating them visually, which one is Neutral, Live and Earth wires.
Is there a device that I could use to find this out?
Here are the images of what I am seeing, the colors are exactly like on the picture.
Cables are covered with paint but once paint is removed, it does not help to see the colors really.
Maybe there is some kind of tool I can use to find out the type of cable?
And a follow up question because it is very related. Once I find the type of cable, I will need to extend a tiny bit one of the cables that is too short (by like 5 cm tops). Do I need to buy this specific type of cable or will any cable of the same mm work?
UPD: Like pointed out by @Armand, one of those wires did not have bare metal and completely covered in paint - this was Earth and it was not used before I removed old lights. 1 down, 2 to go. The other 2 appeared way easier to figure out what to do with, as this is alternate current, any of them could have been used as Live and Neutral wires to connect my next ceiling fan, which worked out fine (not sure what consequences of this are, but it works).

