Group whose center is a direct factor