Impact of epistasis and pleiotropy on evolutionary adaptation