Pipe with flange