Table:
(in thousands of U.S. dollars)	Year Ended December 31, 2018	Year Ended December 31, 2017

Net loss	$(265,511)	$(164,787)

Adjustments to reconcile net loss to net cash provided by operating activities:

Depreciation and amortization	102,839	104,112

Amortization and write-off of deferred financing costs	7,880	6,391

Amortization of deferred drydock and special survey costs	13,828	14,727

Provision for losses on accounts receivable	575	269

Share based compensation	4,556	4,296

Gain on bond and debt extinguishment	(6,464)	(185)

Bargain gain upon obtaining control	(58,313)	—

Income tax benefit	(1,108)	(3,192)

Impairment losses	200,657	50,565

Gain on sale of assets	(894)	(1,064)

Loss/(equity) in affiliates, net of dividends received	84,317	4,610

Net income adjusted for non-cash items	$82,362	$15,742

Take a look at the table in this image and provide me with the latex representation of the table in text format.

\begin{tabular}{|c|c|c|}
\hline
 (in thousands of U.S. dollars) & Year Ended December 31, 2018 & Year Ended December 31, 2017   \\
\hline
 Net loss & \$(265,511) & \$(164,787)   \\
\hline
 Adjustments to reconcile net loss to net cash provided by operating activities: &  &    \\
\hline
 Depreciation and amortization & 102,839 & 104,112   \\
\hline
 Amortization and write-off of deferred financing costs & 7,880 & 6,391   \\
\hline
 Amortization of deferred drydock and special survey costs & 13,828 & 14,727   \\
\hline
 Provision for losses on accounts receivable & 575 & 269   \\
\hline
 Share based compensation & 4,556 & 4,296   \\
\hline
 Gain on bond and debt extinguishment & (6,464) & (185)   \\
\hline
 Bargain gain upon obtaining control & (58,313) & —   \\
\hline
 Income tax benefit & (1,108) & (3,192)   \\
\hline
 Impairment losses & 200,657 & 50,565   \\
\hline
 Gain on sale of assets & (894) & (1,064)   \\
\hline
 Loss/(equity) in affiliates, net of dividends received & 84,317 & 4,610   \\
\hline
 Net income adjusted for non-cash items & \$82,362 & \$15,742   \\
\hline
\end{tabular}