Thanks for replying, we actually thought the same thing. I swapped the injector positions, changed the spark plugs for new ones, and managed to get a used ignition coil. I installed it, and this time cylinders 2 and 3 worked, so I asked them to replace it with another one.
The one they sent also had the same problem, which I found strange, so I tried another coil from a 2002 Hyundai Accent. I wired it up, and it tried to start on the first attempt, but then it just backfired. After that, I installed the coil I bought, and like magic, it started smoothly. As for the scanner, it gave me several readings: knock sensor, air sensor, oxygen sensor, misfire in cylinders 1 and 2, misfire in cylinder 4, and catalytic converter malfunction.
I didn't replace any of the sensors because they tested fine.
Finally, when it started up smoothly, I scanned it again and cleared all the fault codes, and it hasn't shown any codes since. It's been three days now and it hasn't been malfunctioning at all. I hope it doesn't give me any more problems. Thanks a million to everyone.