It will work on either of those.
The GTX 1070 is recommended for both; 1440p@60hz and 1080p@144hz (With or without G Sync, with is better)
mcconkeymike :
The 1070 is the "sweetspot" for 1440p. If you use it for 1080p then you are wasting your money and you should buy a 1060.
Note that he said at 144Hz, a GTX 1060 would not be able to run that to its full potential.
And I believe the 1080 is for 1440p at 144Hz, and 4K at 60Hz.