Demographic circumstances unique to millennials give them certain advantages when it comes to retirement saving compared to older generations — but several factors will make it far harder for them at the same time, according to a new report.

Millennials — who will be between ages 54 and 69 in 2050 — are the most educated generation in history, will live longer, are likely to continue working longer because of the shift toward defined contribution plans in the pensions system, and will operate under more flexible work arrangements compared to previous generations, the Brookings Institution writes in a recent paper. All these factors give them a certain advantage in ensuring they’re adequately prepared for retirement, according to the report.

But even some of these factors present challenges. Living longer means having a longer retirement period, which will require more savings, for example, while the cost of being educated is having more student debt than their predecessors, Brookings writes. Millennials will also have to take on more responsibility for retirement saving than previous generations, according to the report.

Furthermore, millennials have lower net worth, due in part to the financial crisis and the slow recovery that followed, while at the same time they’re marrying, buying homes and having children later than older generations, Brookings writes.

Millennials also face uncertainty in regard to the funding of Social Security and Medicare, according to the report. In addition, demographic shifts in the U.S. will result in a “majority-minority” country by 2050 — and minorities have tended to accumulate less wealth than whites while the wealth gap between black and white households has been growing, Brookings writes.