Weyerhaeuser posts $171 million profit