I purchased a new Mac (Apple iMac MK142LL/A - Intel Core i5, 1.6Ghz, 21.5 Inch LED, 8GB, 1TB, Intel HD Graphics 6000, OS X El Capitan). It worked fine the first day.
Since today, when I try to start the iMac, it shuts down automatically after the loading bar loads 50% in the grey screen. After that it will not start until I unplug the power cable and plug again. Same thing again and again.