<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>SUNRISE: The rich molecular inventory of high-redshift dusty galaxies revealed by broadband spectral line surveys</title></titleStmt>
			<publicationStmt>
				<publisher>Astronomy &amp; Astrophysics</publisher>
				<date>12/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10539220</idno>
					<idno type="doi">10.1051/0004-6361/202347610</idno>
					<title level='j'>Astronomy &amp; Astrophysics</title>
<idno>0004-6361</idno>
<biblScope unit="volume">680</biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Chentao Yang</author><author>Alain Omont</author><author>Sergio Martín</author><author>Thomas G Bisbas</author><author>Pierre Cox</author><author>Alexandre Beelen</author><author>Eduardo González-Alfonso</author><author>Raphaël Gavazzi</author><author>Susanne Aalto</author><author>Paola Andreani</author><author>Cecilia Ceccarelli</author><author>Yu Gao</author><author>Mark Gorski</author><author>Michel Guélin</author><author>Hai Fu</author><author>R J Ivison</author><author>Kirsten K Knudsen</author><author>Matthew Lehnert</author><author>Hugo Messias</author><author>Sebastien Muller</author><author>Roberto Neri</author><author>Dominik Riechers</author><author>Paul van_der_Werf</author><author>Zhi-Yu Zhang</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[<p>Understanding the nature of high-redshift dusty galaxies requires a comprehensive view of their interstellar medium (ISM) and molecular complexity. However, the molecular ISM at high redshifts is commonly studied using only a few species beyond<sup>12</sup>C<sup>16</sup>O, limiting our understanding. In this paper, we present the results of deep 3 mm spectral line surveys using the NOrthern Extended Millimeter Array (NOEMA) targeting two strongly lensed dusty galaxies observed when the Universe was less than 1.8 Gyr old: APM 08279+5255, a quasar at redshift<italic>z</italic>= 3.911, and NCv1.143 (<italic>H</italic>-ATLAS J125632.7+233625), a<italic>z</italic>= 3.565 starburst galaxy. The spectral line surveys cover rest-frame frequencies from about 330 to 550 GHz for both galaxies. We report the detection of 38 and 25 emission lines in APM 08279+5255 and NCv1.143, respectively. These lines originate from 17 species, namely CO,<sup>13</sup>CO, C<sup>18</sup>O, CN, CCH, HCN, HCO<sup>+</sup>, HNC, CS, C<sup>34</sup>S, H<sub>2</sub>O, H<sub>3</sub>O<sup>+</sup>, NO, N<sub>2</sub>H<sup>+</sup>, CH, c-C<sub>3</sub>H<sub>2</sub>, and the vibrationally excited HCN and neutral carbon. The spectra reveal the chemical richness and the complexity of the physical properties of the ISM. By comparing the spectra of the two sources and combining the analysis of the molecular gas excitation, we find that the physical properties and the chemical imprints of the ISM are different: the molecular gas is more excited in APM 08279+5255, which exhibits higher molecular gas temperatures and densities compared to NCv1.143; the molecular abundances in APM 08279+5255 are akin to the values of local active galactic nuclei (AGN), showing boosted relative abundances of the dense gas tracers that might be related to high-temperature chemistry and/or the X-ray-dominated regions, while NCv1.143 more closely resembles local starburst galaxies. The most significant differences between the two sources are found in H<sub>2</sub>O: the 448 GHz ortho-H<sub>2</sub>O(4<sub>23</sub>−3<sub>30</sub>) line is significantly brighter in APM 08279+5255, which is likely linked to the intense far-infrared radiation from the dust powered by AGN. Our astrochemical model suggests that, at such high column densities, far-ultraviolet radiation is less important in regulating the ISM, while cosmic rays (and/or X-rays and shocks) are the key players in shaping the molecular abundances and the initial conditions of star formation. Both our observed CO isotopologs line ratios and the derived extreme ISM conditions (high gas temperatures, densities, and cosmic-ray ionization rates) suggest the presence of a top-heavy stellar initial mass function. From the ∼330–550 GHz continuum, we also find evidence of nonthermal millimeter flux excess in APM 08279+5255 that might be related to the central supermassive black hole. Such deep spectral line surveys open a new window into the physics and chemistry of the ISM and the radiation field of galaxies in the early Universe.</p>]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>The interstellar medium (ISM), comprising interstellar gas, dust, and cosmic rays (CRs), is a fundamental part of the ecosystem of galaxies. The cold ISM (gas and dust with T &lt; 10 3 K), which we simply refer to as the ISM hereafter unless otherwise specified, exhibits complex physical structures across di&#8629;erent scales and plays a crucial role in a range of important physical processes, including star formation <ref type="bibr">(Spitzer 1978)</ref>. Energetic phenomena in the ISM, including shocks and jets, along with interactions with the electromagnetic radiation field and CRs emitted from various sources such as stars, supernovae, and active galactic nuclei (AGN), foster conditions that enable a vast number of chemical reactions <ref type="bibr">(Tielens 2013</ref><ref type="bibr">(Tielens , 2021))</ref>. Consequently, a comprehensive understanding of the ISM in galaxies requires obser-? The final data products of the tables derived from UVFIT are available at the CDS via anonymous ftp to cdsarc.cds.unistra.fr <ref type="bibr">(130.79.128.5)</ref> or via <ref type="url">https://cdsarc.cds.unistra.fr/  viz-bin/cat/J/A+A/680/A95</ref> ?? We dedicate this paper to the memory of our coauthor and friend, Yu Gao, who passed away in May 2022.</p><p>vational studies that delve into its chemical complexity (e.g., <ref type="bibr">Omont 2007;</ref><ref type="bibr">Viti 2016)</ref>.</p><p>Astrochemical studies of nearby galaxies have flourished over the past two decades, driven by advancements in radio/(sub)millimeter instruments. Deep spectral line surveys covering large frequency ranges (see Table <ref type="table">1</ref> of <ref type="bibr">Mart&#237;n et al. 2021</ref> for a list of extragalactic line surveys and references) allow us to study a wide variety of ISM tracers without preselecting the canonical species, such as 12 C 16 O (CO hereafter), thereby o&#8629;ering an unbiased perspective of the ISM by appreciating its chemical complexity. These line surveys of nearby galaxies have unveiled a complicated picture of how di&#8629;erent ISM phases interplay with radiation in the process of star formation and AGN activities and have greatly enriched our understanding of the evolution and ecosystem of galaxies. Interferometers such as the NOrthen Extended Millimeter Array (NOEMA) and the Atacama Large Millimeter/submillimeter Array (ALMA) now enable di&#8629;erent gas tracers in nearby galaxies to be mapped down to the scales of giant molecular clouds, unveiling significant spatial variations in the ISM chemistry that are distinct from those found in the Milky Way, potentially arising from super star clusters and AGN (e.g., <ref type="bibr">Meier et al. 2015;</ref><ref type="bibr">Mart&#237;n et al. 2021;</ref><ref type="bibr">Sakamoto et al. 2021)</ref>.</p><p>However, in contrast to local galaxies, high-redshift galaxies have remained largely unexplored (though there have been several detections in molecular absorbers against bright quasars <ref type="bibr">;</ref><ref type="bibr">Muller et al. 2011</ref><ref type="bibr">Muller et al. , 2014;;</ref><ref type="bibr">Tercero et al. 2020)</ref>, primarily due to sensitivity limitations. The lack of high-sensitivity line surveys at high redshifts prevents us from attaining a comprehensive understanding of the ISM in the early Universe, which often hosts the most extreme ISM conditions and is a key laboratory for testing physical and chemical theories of the ISM.</p><p>A breakthrough came with the discovery of large samples of strongly gravitationally lensed dusty star-forming galaxies at high redshifts (e.g., <ref type="bibr">Negrello et al. 2010;</ref><ref type="bibr">Vieira et al. 2013;</ref><ref type="bibr">Ca&#241;ameras et al. 2015)</ref>. Lensing magnification enables us to achieve sensitivities that allow for the detection of more complex molecules beyond CO. These strongly lensed infraredluminous galaxies are among the most active dusty starbursts in the early Universe (e.g., <ref type="bibr">Blain et al. 2002;</ref><ref type="bibr">Casey et al. 2014;</ref><ref type="bibr">Hodge &amp; da Cunha 2020)</ref>. They are rich in molecular gas and dust and feature bright emission and/or absorption lines, which are often highly excited by intense radiation fields, such as infrared (IR), ultraviolet (UV), and X-ray. Additionally, CRs, stellar winds, and shocks can also serve as excitation sources. The discovery of these galaxies has paved the way for in-depth spectral line surveys, particularly in galaxies with extreme ISM conditions, facilitating an unparalleled insight into their ISM. The spectral richness of such high-redshift dusty galaxies has been demonstrated in recent dedicated observations of the lensed Cloverleaf quasar at z = 2.56 where a variety of molecules have been reported, including HCN, HNC, HCO + , CN, and CO isotopologs (see <ref type="bibr">Gu&#233;lin et al. 2022, and references therein)</ref>. Stacking together the spectra of high-redshift dusty star-forming galaxies from &#8672;200 to 800 GHz in the rest frame <ref type="bibr">(Spilker et al. 2014;</ref><ref type="bibr">Reuter et al. 2023;</ref><ref type="bibr">Hagimoto et al. 2023)</ref>, several molecular lines in addition to CO have also been detected, including H 2 O, H 2 O + , 13 CO, HCN, HCO + , CH and CN. However, stacked spectra only reflect the averaged quantities of the sample, and results can vary with di&#8629;erent weighted average methods, making it di cult to interpret the physical properties.</p><p>Therefore, to accurately depict the ISM properties, it is crucial to conduct in-depth spectral line surveys in individual sources. However, individual detections of molecular gas tracers beyond CO lines remain scarce. Apart from the Cloverleaf <ref type="bibr">(Gu&#233;lin et al. 2022)</ref>, only a limited number of high-redshift sources have been reported with detections of a few species, predominantly only single transitions per molecule (e.g., <ref type="bibr">Solomon et al. 2003;</ref><ref type="bibr">Vanden Bout et al. 2004;</ref><ref type="bibr">Carilli et al. 2005;</ref><ref type="bibr">Gao et al. 2007;</ref><ref type="bibr">Gu&#233;lin et al. 2007;</ref><ref type="bibr">Riechers et al. 2006</ref><ref type="bibr">Riechers et al. , 2007</ref><ref type="bibr">Riechers et al. , 2010</ref><ref type="bibr">Riechers et al. , 2011a;;</ref><ref type="bibr">Danielson et al. 2011;</ref><ref type="bibr">Oteo et al. 2017;</ref><ref type="bibr">B&#233;thermin et al. 2018;</ref><ref type="bibr">Ca&#241;ameras et al. 2021;</ref><ref type="bibr">Rybak et al. 2022</ref><ref type="bibr">Rybak et al. , 2023))</ref>. As a result, our understanding of the high-redshift ISM remains limited.</p><p>In this paper, we report the first results of NOEMA line surveys toward two strongly lensed high-redshift galaxies of contrasting extremes, APM 08279+5255 and NCv1.143, from the SUNRISE (Submillimeter molecUlar liNe suRveys in dIstant duSty galaxiEs) project. This survey project includes multiple deep broadband millimeter spectral line surveys toward four high-redshift targets -APM 08279+5255, NCv1.143, G09v1.97, and BR 1202+0725 -using NOEMA (this paper) and ALMA <ref type="bibr">(Yang et al., in prep.)</ref>. The first results presented in this work highlight the detection of a rich set of emission lines in the rest-frame frequency from about 330 to 550 GHz in two sources with very di&#8629;erent ISM environments -the dusty quasar APM 08279+5255 and the starburst galaxy NCv1.143 (throughout this work, we use the term "ISM environments" to refer either AGN-or starburst-dominated ISM). These comprehensive and unbiased line surveys, spanning a continuous bandwidth, are essential for detecting multiple transitions of molecules beyond CO. They allow us to study the ISM by probing a large range of ISM conditions, provide rich and robust ISM diagnostic tool sets, improve our current potentially biased understanding of the physics and chemistry of the ISM, and reveal how various extreme ISM environments influence its properties.</p><p>Throughout this work, we assume a <ref type="bibr">Chabrier (2003)</ref> stellar initial mass function (IMF) and a definition of infrared luminosity integrated over 8-1000 &#181;m. Based on the starburst evolutionary synthesis models in <ref type="bibr">Leitherer &amp; Heckman (1995)</ref> with a Salpeter (1955) IMF, <ref type="bibr">Kennicutt (1998)</ref> derived the star formation rate (SFR) to infrared luminosity, SFR-L IR , calibration for starburst galaxies (with continuous bursts of age &#8672;100 Myr) as SFR = 1.7 &#8677; 10 10 (L IR /L ) M yr 1 . After translating this calibration to the <ref type="bibr">Chabrier (2003)</ref> IMF using a factor of &#8672;0.63 for the SFR calibration <ref type="bibr">(Madau &amp; Dickinson 2014)</ref>, we derive SFR = 1.1 &#8677; 10 10 (L IR /L ) M yr 1 (with &#8673;30% uncertainty due to variations in star formation histories within individual sources; <ref type="bibr">Kennicutt 1998)</ref>. We note that using a top-heavy stellar IMF, which is found in dusty starburst galaxies, may reduce the SFR/L IR ratio by a factor of at least &#8672;2 <ref type="bibr">(Cai et al. 2020</ref>) and up to &#8672;5 <ref type="bibr">(Yan et al. 2017;</ref><ref type="bibr">Zhang et al. 2018)</ref>. Additionally, if the burst time is shorter by one order of magnitude, the calibration factor will increase by a factor of 3 <ref type="bibr">(Madau &amp; Dickinson 2014)</ref>, introducing additional uncertainties to the SFR-L IR calibration.</p><p>We adopt a spatially flat Lambda cold dark matter (&#8676;CDM) cosmology model with H 0 = (67.4 &#177; 0.5) km s 1 Mpc 1 and &#8998; M = 0.315 &#177; 0.007 <ref type="bibr">(Planck Collaboration VI 2020)</ref>. This translates to luminosity distances and scales of 35 700 &#177; 370 Mpc and 7.44 kpc/ 00 for APM 08279+5255 and 31 970 &#177; 320 Mpc and 7.17 kpc/ 00 for NCv1.143.</p><p>This paper is organized as follows: Sect. 2 introduces the targets of the surveys, Sect. 3 describes the NOEMA observations and the process of data reduction, and Sect. 4 presents a detailed analysis of the data, including line identification. Section 5 discusses the continuum emission covered by our line survey. Section 6 delves into a detailed discussion about the line survey results and a comparison between the two sources, which is followed by chemical modeling in Sect. 7. The impact of differential lensing is addressed in Sect. 8. We conclude in Sect. 9.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Targets -APM 08279+5255 and NCv.1.143</head><p>APM 08279+5255 is a z = 3.911 strongly lensed broad absorption line quasar with complex multiple absorption features mainly seen in the C IV line <ref type="bibr">(Irwin et al. 1998</ref>) and a prodigious apparent bolometric luminosity of 5&#8677;10 15  L <ref type="bibr">(Egami et al. 2000)</ref>. It has been suggested that radiation pressure plays an important role in producing quasar outflow <ref type="bibr">(Saez &amp; Chartas 2011)</ref>. Observations of H and Mg II suggest a mass of the central supermassive black hole (SMBH) of &#8672;10 10 M <ref type="bibr">(Saturni et al. 2018)</ref>. APM 08279+5255 is one of the brightest dust-and gas-rich quasars in the far-infrared and submillimeter (e.g., <ref type="bibr">Downes et al. 1999;</ref><ref type="bibr">Egami et al. 2000;</ref><ref type="bibr">Wei&#223; et al. 2007)</ref>. It is extremely dusty with a total infrared luminosity L IR = (3.4 &#177; 0.4)&#8677;10 14 &#181; 1 L <ref type="bibr">(Leung et al. 2019</ref>, note the di&#8629;erent definition of L IR 1 ). The molecular gas is found to be highly excited with extreme conditions by examining the CO spectral line energy distribution (SLED). The CO excitation can A95, page 2 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> be attributed to two prominent excitation components -a cold one with T kin &#8672; 65 K and n H 2 &#8672; 10 5 cm 3 , and a warm one with T kin &#8672; 220 K and n H 2 &#8672; 10 4 cm 3 which is probably heated by the central AGN <ref type="bibr">(Wei&#223; et al. 2007)</ref>. Observations of multiple H 2 O lines in APM 08279+5255 suggest that the submillimeter H 2 O emission originates in similar regions as CO with a dust temperature T d &#8672; 220 K and the optical depth at 100 &#181;m, &#8999; 100 &#8673; 0.9, where the X-ray radiation of the quasar nucleus penetrates deeply into the buried regions and contributes to the ISM heating (van der <ref type="bibr">Werf et al. 2010;</ref><ref type="bibr">Lis et al. 2011)</ref>. From the early optical and near/mid-infrared observations, APM 08279+5255 shows a triple-image structure, likely composed of the lensed images of the quasar <ref type="bibr">(Oya et al. 2013)</ref>. Based on these observations, APM 08279+5255 is believed to exhibit a very high lensing magnification (&#181; &#8672; 90-120). This magnification is notably sensitive to the size of the source within the source plane, showing a di&#8629;erential lensing factor of up to 10 ( <ref type="bibr">Ledoux et al. 1998;</ref><ref type="bibr">Egami et al. 2000)</ref>. However, later analysis of the 0.3 00 resolution CO(1 0) Very Large Array (VLA) image suggests a naked cusp lens model with a significantly lower magnification of &#8672;7 <ref type="bibr">(Lewis et al. 2002)</ref>. Moreover, a magnification of &#181; = 2-4 was derived based on a di&#8629;erent lens model based on a deeper 0.3 00 CO(1 0) image <ref type="bibr">(Riechers et al. 2009)</ref>, suggesting that the CO disk has an apparent (magnified) radius of about 1.3 kpc, consistent with the CO size derived from excitation analysis <ref type="bibr">(Wei&#223; et al. 2007)</ref>. In this lens model, di&#8629;erential lensing is insignificant (variations .20% for source radius smaller than 5 kpc) and is at most a factor of 2 for the most extreme intrinsic source radius that exceeds 20 kpc. Throughout this work, we adopt this latest lens model.</p><p>The dusty starburst galaxy NCv1.143 is among the brightest strongly lensed sources discovered from the Herschel-ATLAS survey (or H-ATLAS for short; <ref type="bibr">Eales et al. 2010)</ref>; its IAU name is H-ATLAS J125632.7+233625 (or HerBS-5, <ref type="bibr">Bakx et al. 2018)</ref>. At z = 3.565, NCv1.143 is an intrinsically hyper-luminous infrared galaxy with an apparent total infrared luminosity 1 of L IR = (1.4 &#177; 0.2)&#8677;10 14 &#181; 1 L . The magnification is derived to be &#181; = 11.3 &#177; 0.7 based on the 880 &#181;m continuum from <ref type="bibr">Bussmann et al. (2013)</ref> and &#181; = 12.2 &#177; 1.2 based on the 2 mm continuum from <ref type="bibr">Yang (2017)</ref>. Throughout this work, we have adopted the latter value derived from the lens model described in Appendix C. Thus, the intrinsic infrared luminosity is &amp;10 13  L with a molecular gas reservoir of (6.2&#177;1.6)&#8677;10 10 M <ref type="bibr">(Yang et al. 2017)</ref>. The source has one of the highest L IR surface densities in the H-ATLAS sample <ref type="bibr">(Bussmann et al. 2013)</ref>, reaching &#8963; L IR &#8672; &#8677;10 13  L kpc 2 . A series of extensive followup studies (e.g., <ref type="bibr">Yang et al. 2016</ref><ref type="bibr">Yang et al. , 2017) )</ref> found no clear AGN signatures, indicating that this galaxy is likely dominated by starburst activity with an estimated SFR = 1.3 &#8677; 10 3 M yr 1 , although a deeply buried AGN cannot be completely ruled out. Studies of the molecular gas conditions using the CO SLED in NCv1.143 found two prominent excitation components of molecular gas -a lower-excitation one with a kinematic temperature T kin &#8672; 20 K and a molecular gas density n H 2 &#8672; 10 4.1 cm 3 , and a high-excitation molecular gas component with T kin &#8672; 63 K and n H 2 &#8672; 10 4.2 cm 3 <ref type="bibr">(Yang et al. 2017)</ref>. Detection of the J up = 2, 3 and 4 H 2 O lines in NCv1.143 suggests the existence of an optically thick (&#8999; 100 &gt; 1) dusty nucleus with a dust temperature 1 For the values of far-infrared luminosity (rest frame 40-120 &#181;m) L FIR , we converted L FIR to L IR (without AGN contribution) using a factor of 1.91 <ref type="bibr">(Bussmann et al. 2013)</ref>. We performed a similar conversion for APM 08279+5255, taking the star-forming L FIR , by adopting the L FIR = (1.8 &#177; 0.2)&#8677;10 14 &#181; 1 L <ref type="bibr">(Leung et al. 2019)</ref>. We define hyperluminous infrared galaxies with a luminosity criterion of L IR 10 13 L .</p><p>T d &#8672; 75 K, surrounded by an extended cooler disk with T d &#8672; 35 K <ref type="bibr">(Yang et al. 2016;</ref><ref type="bibr">Yang 2017)</ref>. The similarities between the line profiles of the high-J CO and H 2 O lines indicate that they both arise from similarly dense warm gas in star-forming regions across the galaxy.</p><p>In addition to CO and H 2 O, detections of dense gas tracers such as HCN, HNC, and HCO + in APM 08279+5255 <ref type="bibr">(Wagg et al. 2005;</ref><ref type="bibr">Garc&#237;a-Burillo et al. 2006;</ref><ref type="bibr">Wei&#223; et al. 2007;</ref><ref type="bibr">Riechers et al. 2010</ref>) and NCv1.143 <ref type="bibr">(Yang 2017)</ref> have also been reported. These detections, however, lean toward the brightest lines, focusing on specific frequency windows and often capturing only one transition per molecule. This limited scope presents a challenge for conducting a thorough examination of the ISM and its interaction with radiation fields, as such an analysis necessitates the consideration of complex astrochemistry.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Observations and data reduction</head><p>The deep 3 mm spectral line surveys of APM 08279+5255 and NCv1.143 were conducted using NOEMA with its PolyFix correlator <ref type="bibr">(Gentaz 2019)</ref>. The observations were carried out under projects W18EB and S18DC (PIs: C. <ref type="bibr">Yang &amp; A. Omont)</ref>. The PolyFix correlator can process a total instantaneous bandwidth of 7.744 GHz for up to 12 antennas per polarization (dual polarization) per sideband -namely the upper sideband (USB) and the lower sideband (LSB) -which provides a frequency coverage of 15.488 GHz per tuning in dual-polarization, with a fixed channel spacing of 2 MHz across LSB and USB, separated by a gap of 7.744 GHz. As shown in Fig. <ref type="figure">1</ref> and Table <ref type="table">1</ref>, we designed the tunings to allow for a continuous frequency coverage from 71 to 109.5 GHz for NCv1.143 and from 71 to 111 GHz for APM 08279+5255 (except for a gap between 101.7 GHz and 103.3 GHz, intentionally placed to cover some crucial lines at the high-frequency end, close to 111 GHz). In the rest frame, the frequency coverage for APM 08279+5255 corresponds to 347. <ref type="bibr">and for NCv1.143,</ref> GHz. Therefore, the total frequency coverage for both sources extends to approximately 200 GHz in the rest frame. This extensive coverage, as intended, enables us to detect multiple transitions of some key molecular emitters.</p><p>As summarized in Table <ref type="table">1</ref>, the observations spanned two semesters from June 2018 to March 2019. Since our aim is to detect weak spectral features, we conducted our observations in compact C or D configurations to maximize sensitivity. The number of antennas used ranged from six to ten, with ten being used most of the time (Table <ref type="table">1</ref>). The baselines remain compact, with lengths from 24 to 176 m (D configuration) for most of the observations, while for a small portion of the observations, we also used baselines up to 368 m (C configuration). The resulting synthesized beam sizes with natural weightings have modest/low resolutions of &#8672;1.7 00 &#8677;3.0 00 to 4.2 00 &#8677;5.6 00 (about 12&#8677;22 kpc to 31&#8677;41 kpc). The pointing positions are given in Table <ref type="table">1</ref>. We note that, for APM 08279+5255, there is an o&#8629;set of about 9 00 between the phase center and the peak flux position (RA 08h31m41.7s Dec +52 45 0 17.5 00 ; see Fig. <ref type="figure">2</ref>), which does not have any significant impact in our observation, as the position shift can be neglected considering the size of the primary beam (FWHM &#8672;50 00 at 3 mm). Most observations were carried out in good or excellent weather conditions, except for those on November 22 and December 13, 2018, when the weather conditions were moderate. The observations of NCv1.143 were performed mostly in the summer semester and partially in the winter semester, with a mean phase RMS of &#8672;15 and precipitable water vapor (PWV) below 7mm, while A95, page 3 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> </p><p>Fig. <ref type="figure">1</ref>. Tuning setups of the NOEMA observations. Top panel: Atmospheric transmission curve at the zenith of the NOEMA site for the frequency range covered by our line survey. The red and blue lines show the transmission curves for PWV = 1 mm and PWV = 5 mm, respectively. Middle and bottom panels: Tuning setups, their sky (observed) frequency coverage, and the RMS noise reached in each spectral window for APM 08279+5255 and NCv1.143. For display purposes, we smoothed the spectral resolution to 50 MHz, resulting in an RMS that is five times smaller than the noise level reported in Table <ref type="table">1</ref> for the 2 MHz bins. As expected, the edges of the sidebands and the conjunction channels of the two spectral windows within each sideband exhibit large RMS values. APM 08279+5255 was observed in the winter semester with a mean phase RMS of &#8672;5 and PWV below 5mm. Consequently, the total data loss due to flagging is below 20%. The total onsource time for all the tunings was &#8672;22.5 h for NCv1.143 and &#8672;16.4 h for APM 08279+5255. In the end, the flux RMS levels in the native 2 MHz spectral resolution reach &#8672;0.6-1.6 mJy beam 1 and &#8672;0.6-1.0 mJy beam 1 for NCv.143 and APM 08279+5255, respectively. The RMS is also relatively stable across all the frequency coverage, except for the edge of the spectral windows where the values are high (Fig. <ref type="figure">1</ref>). Details of the setups and conditions of the observations are listed in Table <ref type="table">1</ref> and Fig. <ref type="figure">1</ref>. The phase and bandpass were calibrated by measuring standard calibrators that are regularly monitored at NOEMA, including 3C279, 3C273, MWC349, and 0923+392. The accuracy of the absolute flux calibration is estimated to be about &#8672;10% in the 3 mm band. The final uv tables containing the visibilities were produced after calibration using the GILDAS 2 packages CLIC, with the native 2 MHz spectral resolution. Then imaging, CLEANing, uv fitting, and spectra extraction were performed with GILDAS's MAPPING on the uv tables.</p><p>2 See <ref type="url">http://www.iram.fr/IRAMFR/GILDAS</ref> for more information about the GILDAS software. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Data analysis</head><p>Upon acquiring the calibrated uv tables, we collapsed all the channels from each sideband per tuning. Subsequently, we imaged and CLEANed those collapsed uv tables to validate that the sources are not spatially resolved by the synthesized beams.</p><p>As an example, we show the CLEANed images from the USB of the highest frequency tunings (s18dc003 and w18eb003, which correspond to the tunings with the highest spatial resolution) for NCv1.143 and APM 08279+5255 in Fig. <ref type="figure">2</ref>. From the perspective of the all-channel-collapsed images, it is clear that both sources are not significantly resolved by the synthesis beams with dimensions of approximately 3.0 00 &#8677;1.7 00 -5.6 00 &#8677;4.2 00 (using natural-weighting) for the signal surpassing the 5 levels.</p><p>However, since the all-channel-collapsed images are dominated by the dust continuum, it is important to check if any of our observed line emissions can be significantly more extended than the dust continuum. Notably, some molecular line maps (e.g., low-J CO) show a more extended spatial distribution than the dust continuum in dusty star-forming galaxies (e.g., <ref type="bibr">Ivison et al. 2011;</ref><ref type="bibr">Calistro Rivera et al. 2018;</ref><ref type="bibr">Tsukui et al. 2023)</ref>. After further examining specific channels where the emission is dominated by lines (e.g., CO), we find no significant di&#8629;erence in the size of the source between the all-channel-collapsed images and the line-dominated channel images (all the di&#8629;erences are below 3 ). We thus conclude that all the line emissions and the dust continuum are not resolved by our beams. Additionally, we do not expect any significant missing flux, given the compactness of the emission with regard to the beam sizes.</p><p>Since the sources are not resolved and remain compact for both the emission from the continuum and the lines, with the purpose of extracting the total fluxes and maximizing the signalto-noise ratios, the emission of our sources can thus be approximated using simple elliptical Gaussian models in the uv plane across all the channels. Such an assumption is also consistent with other long-baseline interferometric data of the sources, namely the 0.5 00 &#8677;0.3 00 resolution 1.2 mm dust continuum, CO and H 2 O line images of NCv1.143 (see Yang 2017 nad our Appendix C) and the 0.3 00 resolution 2.6 mm dust continuum and CO images of APM 08279+5255 <ref type="bibr">(Riechers et al. 2009</ref>). These high-angular-resolution data show that the largest structures of the ISM emission are .1 00 for APM 08279+5255 and .2 00 for NCv1.143. These structures are characterized by the lensing-produced multiple image components distributed along the Einstein rings. The sizes of the Einstein rings are slightly smaller than the synthesized beam sizes as listed in Table <ref type="table">1</ref>. The individual image components are about .0.2 00 and 0.7 00 for APM 08279+5255 and NCv1.143, respectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">Extracting spectra</head><p>For flux extraction, we assume a model of a single twodimensional elliptical Gaussians and directly fit the visibilities in the uv plane. We verified our fitting results by checking the residual images and did not find any significant residual fluxes. Nevertheless, we caution that our purpose is only to extract the total fluxes in each channel, and the study of the ISM morphology is beyond the scope of this work. Therefore, while the twodimensional elliptical Gaussian models are accurate enough as approximations to extract source flux and reduce the ambiguity in CLEANing and aperture selection in the traditional method of spectra extraction, they do not reflect the source morphology (see Appendix C for discussion of the morphology of the sources with high spatial resolution data). Considering the spatial arbituary unit Fig. <ref type="figure">2</ref>. NOEMA CLEANed images of APM 08279+5255 and NCv1.143, made from the visibilities obtained by averaging all the USB channels from the highest-frequency tunings (w18eb003 and s18dc003; Table <ref type="table">1</ref>). These tunings were chosen since they are expected to o&#8629;er the highest spatial resolution among all the spectral windows in our tunings. The contour levels begin at 5 and increase in increments of 10 . The unit of the color bar and contours is arbitrary, with values representing fluxes integrated over the entire USB of the tuning. The primary objective here is to illustrate that the sources are unresolved rather than provide precise flux measurements. The o&#8629;set for APM 08279+5255 is explained in Sect. 3.  <ref type="table">1</ref>). The &#8672; 9 00 shift in RA of APM 08279+5255 was due to a shifted observational phase center. The RA and Dec positions are the center of the Gaussian profiles relative to the phase center. The rest of the fitted parameters -the major and minor axis of the ellipse, r major and r minor and the position angle PA are all consistent across di&#8629;erent spectral windows within the uncertainties. As they are irrelevant to the purpose of this work, we do not list them here.</p><p>resolution of our line survey data and the main goal of maximizing spectral sensitivity and extracting fluxes, two-dimensional elliptical Gaussian is thus a good approximation. The two-dimensional elliptical Gaussian profiles are characterized by the central positions relative to the phase centers, RA and Dec , the major and minor axes, r major and r minor , the position angle PA, and the total flux. We used the UVFIT package of the GILDAS to fit the visibilities in the uv-plane directly with the model. We fixed the parameter of RA , Dec , r major , r minor , and PA to the values derived from the all-channel-collapsed uv tables for each tuning (assuming that the parameters, except for the flux, do not vary significantly between the LSB and USB within the same tuning), and only allow the flux to change across all the channels. Accordingly, the fitted fluxes, along with the errors across different channels, produce the final spectra containing fluxes and their errors.</p><p>The central positions, which are part of the fixed parameters derived in each tuning, are listed in Table <ref type="table">2</ref>. For NCv1.143, we find an elliptical Gaussian size of &#8672;(1.3-1.6) 00 &#8677;(1.2-1.4) 00 , depending on the frequencies. For APM 08279+5255, the A95, page 5 of 39 values of r major /r minor are from 1.41 &#177; 0.38 to 2.60 &#177; 1.60, indicating its elongated morphology, with similar PA values derived from 40 &#177; 10 to 46 &#177; 21 deg across three tunings. This is consistent with the elongated distribution seen at highspatial-resolution images <ref type="bibr">(Riechers et al. 2009</ref>). For NCv1.143, the aspect ratio (r major /r minor ) is from 1.03 &#177; 0.06 to 1.40 &#177; 0.09, showing little degree of deviation from circular symmetry, consistent with high-angular-resolution images (Appendix C). Both uv-plane models are robust; the fitted parameters have a good agreement across all three tunings for each source.</p><p>The positions of APM 08279+5255 are particularly well constrained because of the stable observation conditions and the compactness of the source compared with the synthesis beams (Table <ref type="table">2</ref>). Nevertheless, we also find that the values of r major and r minor of APM 08279+5255 are decreasing with increasing frequencies, suggesting that the true source size is significantly smaller than the synthesis beam. While for NCv1.143, similar values of r major and r minor across three tunings indicate that the source is only slightly smaller than the synthesis beam.</p><p>From the aforementioned method, we obtained six spectra for each source corresponding to all the USB and LSB of the three tunings per source. The spectra are then combined through a simple linear re-grid along the frequency axis, taking the errors of each channel into account. The final combined spectra are displayed in Fig. <ref type="figure">3</ref> (a zoom-in view is provided in Fig. <ref type="figure">A</ref>.1). The following analyses throughout the work are then based on these final combined spectra.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Line identification</head><p>To maximize the accuracy of the line identification, we adopt two complementary methods that cross-verify each other to produce the final line catalogs. First, we utilized MADCUBA<ref type="foot">foot_0</ref> (MAdrid Data CUBe Analysis; <ref type="bibr">Mart&#237;n et al. 2019a</ref>) to identify molecular species by simultaneously fitting all their transitions within our frequency coverage, also accounting the brightness of the lines as predicted by the local thermal equilibrium (LTE) assumption. Second, we input the identified line detection list, as priors, into our matched filter identification code to cross-check and ensure that no line features are overlooked. In the following sections, we provide the details of these processes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.1.">Local thermal equilibrium analysis and line identification</head><p>As an initial step to identify the spectral line detections in our observations, we deployed MADCUBA to conduct line fittings of all the lines across the entire spectra, assuming LTE conditions. Fitting the emission of all transitions for all the possible species, rather than identifying individual spectral features by their central observed frequency, allows for a robust identification when multiple transitions are detected. Additionally, this method accounts for line blending based on identified species and their LTE-predicted fluxes. We included a total of 29 species in the model, drawing from previously published extragalactic line surveys <ref type="bibr">(Mart&#237;n et al. 2021)</ref>. A list of the molecules and transitions detected is compiled in</p><p>Table 3. Within the 29-species list, undetected species included in the fit are CH 3 CN, CH 3 OH, H 2 CO, H 2 S, N 2 D + , the isotopologs C 17 O, DNC, C 15 N, HC 15 N, H 15 NC, and the vibrational states of HNC. We do not identify any other feature outside this list in our spectra (which is crosschecked in Sect. 4.2.2).</p><p>The model adopts a linewidth of 520 and 330 km s 1 for APM 08279+5255 and NCv1.143, respectively, as derived from CO emission from our data. These values are consistent with previous measurements <ref type="bibr">(Wei&#223; et al. 2007;</ref><ref type="bibr">Yang et al. 2017</ref>). Here, we assume an apparent source size of 0.13 arcsec 2 , which should be within a factor of .3 from the sizes of both sources (with significant uncertainties; see our <ref type="bibr">Appendix C and Riechers et al. 2009)</ref>. The e&#8629;ect of the source size in the model partially degenerates with the column density, where a smaller source size would require higher column densities to model the observed spectra. Given that the bulk of our analysis is rooted in comparing relative column densities (to that of C 18 O, see Sect. 6), the uncertainties associated with size estimations are likely canceled out if the line-emitting regions are similar. If this is the case, the choice of source size will have minimal influence on our overall conclusions. We also acknowledge that some of the lines might have di&#8629;erent sizes than that of the C 18 O lines, such as more extended low-J CO. However, because of the limited spatial resolution of our data, future high-angular-resolution observations are needed to disentangle the uncertainties in the sizes of the emitting regions for a more accurate accounting of the size variations across all the lines. With the assumed source size, the models are still within the optically thin regime for almost all the lines. A much smaller source size would result in line saturation, mostly on the CO transitions toward NCv1.143, while the rest of the species is still in the optically thin regime. For those species for which the excitation temperature could not be constrained with the observations, mainly those with a single spectral line feature, a T ex of 36 and 25 K has been derived from HCN, HCO + , and HNC and assumed for all other species (except for H 2 O and the vibration excited HCN), for APM 08279+5255 and NCv1.143, respectively. It is important to note that H 2 O lines are mainly powered by radiative pumping in both sources <ref type="bibr">(van der Werf et al. 2010;</ref><ref type="bibr">Yang et al. 2016)</ref>; therefore, the fitting here (assuming a molecular-gas temperature of 230 K for both sources) serves only to identify the H 2 O features. We assume an ad hoc high temperature of 300 K, which is the typical value found in Arp 220 <ref type="bibr">(Mart&#237;n et al. 2011</ref>) and NGC 4418 <ref type="bibr">(Sakamoto et al. 2010)</ref>, to fit the vibrational transitions of HCN given its high energy levels. Table <ref type="table">4</ref> lists the fitted column density (N) and temperature of the molecular species under LTE for both sources. We note that the excitation temperature (T ex ) should be treated as a lower limit of the kinetic temperature (T kin ) of the molecular gas <ref type="bibr">(Goldsmith &amp; Langer 1999)</ref>. Nevertheless, the higher T ex values found in APM 08279+5255 as compared to NCv1.143 reflect that the molecular gas conditions are generally more extreme in the former.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.2.">Matched-filtering line identification and the final fitting results</head><p>After identifying the spectral lines using MADCUBA under the LTE assumptions as described in the previous section, we fed in the list of identified lines as priors and performed a second search based on a matched-filtering algorithm, where we convolve the spectra with Gaussian kernels based on the best fit CO linewidths, utilizing the specutils package of AstroPy (similar approach as in, e.g., <ref type="bibr">Boogaard et al. 2023)</ref>. This process leveraged the well-detected bright CO-line profile to enhance detection and filter out noise for better detecting weak emission features. First, we conducted a "blind" matched-filter detection using only a 5-detection threshold. Then, we further lowered our detection threshold based on the prior information about the line A95, page 6 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> Peak ~ 29 mJy Yang, C., et al.: A&amp;A 680, A95 (2023) </p><p>Notes. Some of the lines are not detected because of the di&#8629;erence in the rest-frame frequency coverage for the two sources. See Fig. <ref type="figure">3</ref> for details.  (a) The reported column density log 10 N = A(B) corresponds to N = 10 A &#177; 10 B .</p><p>detection from MADCUBA, especially for the case of the blended lines, and performed a second line search. Accordingly, we iden-tified all the emission and absorption lines after this search. Statistical tests are performed to choose the adequate threshold to make sure more than 99.7% of the detected lines are real. In the end, we also verified all the line identifications visually as a triple-check. We do not see any significant unidentified lines beyond the initial MADCUBA list. Thus, our initial list of 29 species is su cient for line identification.</p><p>The final cross-verified detections are summarized in Table <ref type="table">3</ref>. During this process, we simultaneously fitted all the line features, along with the underlying continuum emission (Figs. <ref type="bibr">A.2 and A.3)</ref>. The discussion on the physical aspects of the continuum for both sources is presented in Sect. 5. In the fitting process, we also deployed a Markov chain Monte Carlo (MCMC) technique, where we used samplers that are twice the number of the free parameters with 2000 interactions after 1000 burn-in steps. The derived posterior distribution of the fitted fluxes can better account for the overall uncertainties. The resulting line fluxes are listed in Table <ref type="table">5</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Continuum: Thermal dust and free-free emission</head><p>Due to the exquisite capability of NOEMA to calibrate the continuum over large frequency ranges, we can constrain the continuum emission of the two sources using the full coverage of the continuum flux densities across the rest-frame frequency range of &#8672;330-550 GHz.</p><p>For both galaxies, we assume two components that contribute to the continuum at this frequency range: the Rayleigh-Jeans tail of the modified black body emission from the dust and the free-free (thermal Bremsstrahlung) emission produced by free electrons scattering o&#8629; ions commonly in HII regions.</p><p>Our assumption aligns with the global spectral energy distribution (SED) analysis of these two sources <ref type="bibr">(Leung et al. 2019;</ref><ref type="bibr">Yang et al. 2017)</ref>, where the contribution from the nonthermal part is negligible around &#8672;330-550 GHz. The full SEDs of the two galaxies align with the typical synchrotron emission in normal galaxies <ref type="bibr">(Condon 1992)</ref>, contrasting with radio-loud sources where nonthermal emissions can have significant contributions (e.g., <ref type="bibr">Falkendal et al. 2019</ref>).</p><p>A95, page 8 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref>  Notes. The upper energy levels, frequencies, and Einstein A coe cients of the molecules are taken from <ref type="bibr">Sch&#246;ier et al. (2005)</ref>. To complete the table, we included line detections reported in previous studies. For the CN lines, we do not distinguish between the hyper-fine splitting caused by the nuclear spin of nitrogen (described by quantum number F) due to limited spectral resolution. For the CCH lines, because the frequencies of the fine and hyper-fine splitting within the same N + 1!N are very close (considering the four brightest transitions for a given N J,F , we have the brightest four lines that are within 0.06 GHz), we do not distinguish the hyper-fine lines. For the NO and CH, we only list the fine structure and &#8676;-doublet because the hyper-fine lines are too close to be separated. For the aforementioned molecules, we list the E up /k B and &#9003; rest frame with the highest Einstein A coe cient as a representative (for the CH lines, we list 3/2, 1 + !1/2, 0 and 3/2, 2 !1/2, 1 + ). The data of C 34 S, HCN-VIB (v 2 = 1 f ) and c-C 3 H 2 are taken from CDMS <ref type="bibr">(Endres et al. 2016)</ref>. For the HCN and the N 2 H + lines, we do not consider their hyper-fine structure lines considering the spectral resolution and the intrinsic linewidths of the galaxies. As shown in Fig. <ref type="figure">4</ref>, to simplify the fitting, we used the Rayleigh-Jeans approximation for the thermal dust emission while adopting a &#8629; = 0.1 spectral index for the free-free; thus, we have the following expression of the total flux, which consists of two power-law components:</p><p>where C R J and C free free are the scaling factors of the fluxes that reflect relative contributions from each component, &#9003; is the rest-frame frequency (&#9003; 0 = 300 GHz) and is the dust emissivity index. The fitting results are shown in Fig. <ref type="figure">4</ref>. The fitted values for C R J and C free free are 0.38 &#177; 0.03 mJy and 0.00 &#177; 0.02 mJy for NCv1.143 and C R J = 0.15 &#177; 0.01 mJy and C free free = 0.38 &#177; 0.01 mJy for APM 08279+5255. Therefore, for NCv1.143, we find the continuum covered by our line survey is totally dominated by dust emission, with = 1.71 &#177; 0.02, while for APM 08279+5255, the free-free contribution is more prominent with a contribution from about 57% at 350 GHz to 27% at 500 GHz, and the dust continuum contributing the rest 43% to 73% with = 1.73 &#177; 0.03. While the thermal dust flux contribution of 0.27 mJy is in excellent agreement with <ref type="bibr">Leung et al. (2019)</ref> for APM 08279+5255, our free-free component (0.37 mJy) is at least three times larger than previous studies of the global SED <ref type="bibr">(Stacey et al. 2018;</ref><ref type="bibr">Leung et al. 2019)</ref>. We note that the cosmic microwave background can a&#8629;ect the fitted spectral index in the Rayleigh-Jeans part depending on redshift and dust temperature. Following da <ref type="bibr">Cunha et al. (2013)</ref>, assuming the dust temperatures of &amp; 40 K <ref type="bibr">(Yang et al. 2017;</ref><ref type="bibr">Leung et al. 2019)</ref>, we estimate that the value of may be slightly underestimated by about 9%, while this value can be even smaller in APM 08279+5255 due to a higher dust temperature (see also <ref type="bibr">Zhang et al. 2016</ref>). This will further increase the fraction of the free-free contribution toward the low-frequency end. This raises the question of what causes such a di&#8629;erence in the ratio between free-free and thermal dust emission. Compar-ing the two sources, while the dust emission remains similar, the free-free emission from APM 08279+5255 is significantly higher. Both sources have high apparent SFRs around 1.2 1.5 &#8677; 10 4 &#181; 1 M yr 1 . Using the correlation between free-free luminosity and the SFR <ref type="bibr">(Algera et al. 2022)</ref>, assuming the typical electron temperature of the HII regions of 10 4 K and a thermal fraction of 1 (neglecting synchrotron emission around 300-500 GHz), we derive a luminosity of free-free emission of about 1.7 &#8677; 10 31 erg s 1 Hz 1 at 350 GHz, which translates to fluxes of about 0.06 mJy, about six times lower than the observed value. But this value is in agreement with the free-free contribution from the global SED fitting of APM 08279+5255 <ref type="bibr">(Stacey et al. 2018;</ref><ref type="bibr">Leung et al. 2019)</ref>. One possibility is that the contribution from the synchrotron emission in APM 08279+5255 is significant because of its AGN activities. However, longer wavelength data of APM 08279+5255 showed that the synchrotron emission is almost two orders of magnitude smaller than thermal dust and free-free, which rules out this scenario <ref type="bibr">(Stacey et al. 2018;</ref><ref type="bibr">Leung et al. 2019)</ref>. Another possibility is an additional contribution from very cold dust (T &lt; 15 K) emission (typically found in nearby star-forming galaxies, <ref type="bibr">Galliano et al. 2018</ref>) in APM 08279+5255. However, considering the similarity of the bulk of the dust emission in NCv1.143 and APM 08279+5255, it will be di cult to explain why such very cold dust is not present in NCv1.143. The third possibility is an additional millimeter flux contribution from the non-self-absorbed part of the synchrotron radiation from the hot corona around the SMBH (e.g., <ref type="bibr">Laor &amp; Behar 2008;</ref><ref type="bibr">Inoue &amp; Doi 2014;</ref><ref type="bibr">Kawamuro et al. 2022)</ref>. Accordingly, using the 2-10 keV X-ray luminosity of APM 08279+5255 (&#181;L X = 3 &#8677; 10 46 erg s 1 ; <ref type="bibr">Bertola et al. 2022)</ref> and the correlation between millimeter and X-ray corona emission <ref type="bibr">(Kawamuro et al. 2022)</ref>, we find a corresponding millimeter flux of about 0.05 mJy at 350 GHz (assuming the millimeter corona emission peaks around 300 GHz), with significant uncertainties. Such a millimeter emission from the corona component A95, page 10 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> Fig. <ref type="figure">4</ref>. Fitting of the continuum of APM 08279+5255 and NCv1.143. Fluxes and errors are in black and blue, respectively. The solid red lines represent the total flux from the model. The dotted and dashed orange lines are the free-free and thermal dust components from the model, respectively. It is clear from the fitting that APM 08279+5255 has a flatter spectrum, which can be explained by contributions from freefree and/or corona emission from the SMBH, while the continuum of NCv1.143 is dominated by thermal dust. may explain the observed elevated fluxes of APM 08279+5255 at lower frequencies. If this is the case, the value of could be even higher to account for the steeper increase with less contribution from the free-free after including this corona component. In the global SED of APM 08279+5255 shown in <ref type="bibr">Stacey et al. (2018)</ref>, it is evident that there is flux excess, which is about 0.1-0.2 mJy depending on the frequency, that cannot be explained by free-free combining thermal dust around rest frame 100-400 GHz. The excess value is in broad agreement with a 50% contribution from the millimeter corona flux inferred from the X-ray luminosity. However, we will need to further combine data at the rest-frame frequency range of 50-300 GHz, where the corona emission usually peaks, to test this scenario. This is beyond the scope of this work and will be presented in another paper <ref type="bibr">(del Palacio et al., in prep.)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">A detailed look at the detected molecules and a comparison of the two sources</head><p>As displayed in Fig. <ref type="figure">3</ref> and</p><p>Table 3, we have detected a total of 17 species, including two isotopologs of CO and one isotopolog of CS, plus the vibrational line of the HCN. Except for the [C I]</p><p>line, all of the species have at least two transitions detected in at least one of the sources. Among these lines, the CH, NO, HCN-VIB (rotational transitions within the vibrationally excited state of HCN v 2 = 1 f ), 380 GHz H 2 O maser, and H 3 O + lines are the first high-redshift detections in individual sources reported.</p><p>Given the existing extensive discussion of the CO SLED in APM 08279+5255 and NCv1.143 <ref type="bibr">(Wei&#223; et al. 2007;</ref><ref type="bibr">Yang et al. 2017)</ref>, we do not delve into the discussions of the CO lines in this work. Here, we only highlight that the CO SLED of APM 08279+5255 shows a more elevated shape toward the high-J CO lines in Fig. <ref type="figure">5</ref>, indicating an overall more excited molecular gas condition <ref type="bibr">(Rosenberg et al. 2015)</ref>.</p><p>From the observed integrated fluxes in Table <ref type="table">3</ref>, we derive the apparent line luminosities, &#181;L line (in units of L ) and &#181;L 0 line (in units of K km s 1 pc 2 ) following <ref type="bibr">Solomon et al. (1992)</ref> using</p><p>where I line , &#9003; and D L are in the units of Jy km s 1 , GHz and Mpc, respectively. We note here that because the 13 CO(4-3) and CS(9-8) lines are blended due to their close frequencies, we extrapolate the integrated flux of CS(9-8) by combining the data of CS(7-6), CS(8-7) and CS(10-9), and we subtracted this flux from the blended line flux for obtaining the integrated flux of 13 CO(4-3). Considering the smooth CS SLED in both sources, we do not expect a strong overestimation of the CS(9-8) line flux, which can cause an underestimation of the integrated flux of the 13 CO(4-3) line in APM 08279+5255.</p><p>Assuming that the magnification factors do not vary significantly among the emissions (Sect. 8), we remove the magnification factor by normalizing the luminosities using the C 18 O (4-3) line (given that the C 18 O line is likely optically thin as we argue in Appendix D and the emitting size of the C 18 O is very similar to most of the other dense gas tracers; see, e.g., <ref type="bibr">Mart&#237;n et al. 2021</ref>). In Fig. <ref type="figure">5</ref>, we show the comparison between the line luminosities normalized by C 18 O(4-3) (L line and L 0 line ) of APM 08279+5255 and NCv1.143. We caution that the ratio in Fig. <ref type="figure">5</ref> depends on the normalization factor, which, however, does not a&#8629;ect the overall shapes of the SLEDs.</p><p>As shown in Fig. <ref type="figure">5</ref>, the luminosity of CO(4-3) and C 18 O (4-3) are similar for both sources, despite APM 08279+5255 having an overall elevated CO SLED. APM 08279+5255 has a significantly low luminosity ratio of [C I](1-0)/C 18 O(4-3) compared to NCv1.143, while the 13 CO(4 3)/C 18 O(4-3) ratio is higher than NCv1.143. We also see a similarly high ratio of the luminosities of other dense gas tracers, such as CCH, HCN, HCO + , HNC, and CS over the value of C 18 O(4-3). If there is no deficit of C 18 O in APM 08279+5255, then the lines of dense gas tracers are at least a factor of 2 brighter in APM 08279+5255, indicating that the gas conditions in the quasar host are more extreme. This is consistent with molecular gas conditions derived from the CO SLEDs of APM 08279+5255, where the thermal pressure reaches 2 &#8677; 10 6 K cm 3 <ref type="bibr">(Wei&#223; et al. 2007)</ref>. While in NCv1.143, the thermal pressure is .1 &#8677; 10 6 K cm 3 <ref type="bibr">(Yang et al. 2017)</ref>. This is also in line with our non-LTE excitation analysis of the dense gas tracers presented in Sect. 6.5.</p><p>Before applying any gas excitation and radiative transfer model to the observed SLEDs, it is useful to inspect their shapes, where di&#8629;erent heating mechanisms can leave di&#8629;erent imprints <ref type="bibr">(Rosenberg et al. 2015)</ref>. In Fig. <ref type="figure">5</ref>, the CO SLEDs reveal a clear di&#8629;erence at the high energy levels, where APM 08279+5255 shows almost constant L 0 line (thermalized), while the luminosity drops by a large factor for higher energy level CO lines in NCv1.143. This suggests that the gas conditions are more extreme in APM 08279+5255 than in NCv1.143.</p><p>A95, page 11 of 39</p><p>3 987 8-7 4-3 1-0 752 1129 1208 475 1153 1163 380 448 365 396 0 1 2 -1 -2 0 1 2 -1 -2 CO C 13 CO C 18 O CN HCN CCH HCO + HNC CS H 2 O H 3 O + NO N 2 H + C 34 S CH CO C C 18 O CN HCN CCH HNC CS NO v-HCN CH c-C 3 H 2 4-3 1-0 3-2 3-2 3-2 4-3 4-3 4-3 7-6 4-3 4-3 4-3 987 8-7 4-3 1-0 752 1129 1208 475 1153 1163 380 448 365 396 c-C 3 H 2 H 3 O + APM 08279+5255 NCv1.143 H 2 O 13 CO HCO + v-HCN N 2 H + C 34 S For the dense gas tracer lines of HCN, HCO + , HNC, and CS, APM 08279+5255 has slightly more elevated SLEDs than NCv1.143, showing a more extreme heating mechanism in the quasar host. The most striking and complex di&#8629;erence is observed in the H 2 O lines, where we find slightly elevated H 2 O(2 11 2 02 ) and H 2 O(3 21 3 12 ) luminosity in NCv1.143, while the 448 GHz H 2 O(4 23 3 30 ) is about nine times brighter in APM 08279+5255. Such a di&#8629;erence suggests that the J up = 2 and 3 H 2 O lines might arise from very di&#8629;erent conditions compared to the region that the H 2 O(4 23 3 30 ) traces. The latter might be tightly related to AGN-powered radiative pumping. Thus, this line is much more excited in APM 08279+5255 than in NCv1.143. This is further explained by the detailed analysis of H 2 O excitation in Sect. 6.3. Besides H 2 O, the H 3 O + line in APM 08279+5255 is also much enhanced. Additionally, we identify the first high-redshift detection of the HCN-VIB linethree HCN-VIB lines with J up ranging from 4 to 6 are detected in APM 08279+5255, while they remain undetected in NCv1.143.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1.">Comparison of the LTE-derived abundances</head><p>To understand the astrochemical di&#8629;erences between the two sources, we compare their relative abundances derived using MADCUBA, together with some local prototypical galaxies: the A95, page 12 of 39 Table 4), which can be treated as the relative abundances. The plot is ordered, from left to right, according to the relative abundance in APM 08279+5255 from high to low. Some local sources from the literature are also shown: NGC 253 (CMZ; Mart&#237;n et al. 2021; Rangwala et al. 2014), NGC 1068 (inner &#8672;2 kpc; Aladro et al. 2015), NGC 4418 (Costagliola et al. 2015), and Arp 220 (Mart&#237;n et al. 2011).</p><p>central molecular zone (CMZ) region of the starburst galaxy NGC 253 <ref type="bibr">(Mart&#237;n et al. 2021;</ref><ref type="bibr">Rangwala et al. 2014)</ref>, the central &#8672;2 kpc nuclear region of the Seyfert 2 galaxy NGC 1068 <ref type="bibr">(Aladro et al. 2015)</ref>, globally integrated values of the luminous infrared galaxy with a deeply buried nuclei NGC 4418 <ref type="bibr">(Costagliola et al. 2015)</ref> and the archetypal ultra-luminous infrared galaxy Arp 220 <ref type="bibr">(Mart&#237;n et al. 2011)</ref>. We also note that all the line surveys mentioned above are performed at scales &#8672;1-2 kpc that is comparable with the size of our galaxies, and this can potentially minimize the chemical variations due to differences of spatial scales <ref type="bibr">(Butterworth et al. 2022)</ref>. Given that we do not have a direct estimate of the absolute abundance of each molecule, we take the column densities listed in Table <ref type="table">4</ref>, normalize all the values with that of the C 18 O (as a proxy of total H 2 , it is optically thin as shown in Appendix D; besides, the size e&#8629;ect mentioned in Sect. 4.2.1 is minimum because the size of the C 18 O emission is close to other dense gas tracers as found in, e.g., <ref type="bibr">Mart&#237;n et al. 2021)</ref>, as a proxy of the relative abundance ratio (Fig. <ref type="figure">6</ref>). Such a ratio also removes the uncertainty of the unknown source size (which includes the lensing magnification) if we assume that all the molecules are well-mixed. Nevertheless, we acknowledge the uncertainties as the molecular abundances can vary by a large factor within a galaxy (e.g., <ref type="bibr">Garc&#237;a-Burillo et al. 2014;</ref><ref type="bibr">Huang et al. 2022</ref>). However, given that our observation is spatially unresolved, such an assumption can be used as a first-order approximation until high-spatial-resolution data are available.</p><p>The comparison of the relative abundance (with respect to C 18 O) of all the molecules between the two sources, plus four nearby galaxies, is shown in Fig. <ref type="figure">6</ref>. The molecules are ranked, from left to right, with the decreasing order of the relative molecular abundances of APM 08279+5255. Except for the neutral carbon, almost all the molecules show higher relative abundances in the quasar APM 08279+5255 than in NCv1.143, where the di&#8629;erence becomes most significant in the dense gas tracers like HCN, HCO + , HNC, CS, and C 34 S. Notably, the CN abundance of NGC 4418 reported by <ref type="bibr">Costagliola et al. (2015)</ref> is exceptionally high compared with all other galaxies. We also note here that the relative abundances are quite uncertain, given many sources of the uncertainties involved in the LTE analysis.</p><p>To better understand the di&#8629;erences in the relative abundances between the two sources and compare these abundances with some local sources, we present the ratios of relative abundances for APM 08279+5255 and NCv1.143 in Fig. <ref type="figure">7</ref>. In addition to the ratio between APM 08279+5255 and NCv1.143, we include the ratios for our high-redshift targets when compared with -the CMZ of NGC 253, which is driven by pure starburst activity <ref type="bibr">(Mart&#237;n et al. 2021)</ref>; NGC 4418, characterized by AGN activity <ref type="bibr">(Costagliola et al. 2015)</ref>; and NGC 1068, the inner &#8672;2 kpc nuclear region, where the abundances are expected to be dominated by AGN <ref type="bibr">(Aladro et al. 2015)</ref>. In Fig. <ref type="figure">7</ref> we group the ratios between each two of these galaxies into three categories: (1) AGN/ starburst (solid circles), which are ratios of APM 08279+ 5255/NCv1.</p><p>143, APM 08279+5255/NGC 253, and NGC 1068/ NCv1.143; (2) AGN/AGN and starburst/starburst (solid diamonds), which are ratios of APM 08279+5255/NGC 1068, APM 08279+5255/NGC 4418, and NCv1.143/NGC 253; and (3) starburst/AGN (crosses), which are NCv1.143/NGC 1068, NCv1.143/NGC 4418, and NGC 253/NGC 1068.</p><p>From left to right in Fig. <ref type="figure">7</ref>, we rank the molecules in the increasing order of the relative abundance ratio of APM 08279+5255/NCv1.143. The figure highlights the fact that the dense gas tracers like HNC, HCN, HCO + , and CS are considerably more abundant in APM 08279+5255 than in NCv1.143, while the di&#8629;erence is less prominent in CN, 13 CO and CCH. It is worth noting that in high-temperature environments, where AGN can heat up the dust and gas, providing adequate conditions for high-temperature chemistry, CN can be converted into HCN e&#8629;ectively <ref type="bibr">(Harada et al. 2010)</ref>, leading to a decrease in CN and an increase in HCN. This is fully consistent with the fact that the relative abundance ratio of HCN/CN is</p><p>A95, page 13 of 39 Yang, C., et al.: A&amp;A 680, A95 (2023) 0.01 0.1 1 10 100 Ratio of the relative abundance to C 18 O C CO CN CCH C 34 S HNC HCN CS HCN-VIB 0.1 1 10 100 more abundant in APM 08279 than in NCv1.143 NGC 4418/NCv1.143 NGC 1068/NCv1.143 C 18 O 13 CO N 2 H + HCO + APM08279/NCv1.143 APM08279/NGC253 APM08279/NGC1068 NCv1.143/NGC253 NCv1.143/NGC4418 NCv1.143/NGC1068 NGC1068/NGC253 NGC253/NGC1068 APM08279/NGC4418 Fig. 7. Comparison of the abundance ratios of APM 08279+5255 (APM 08279 for short), NCv1.143, and three archetype local galaxies -the CMZ of NGC 253 (Mart&#237;n et al. 2021; Rangwala et al. 2014), &#8672;2 kpc nuclear region of NGC 1068 (Aladro et al. 2015), and NGC 4418 (Costagliola et al. 2015) -for the species detected in both APM 08279+5255 and NCv1.143. The abundance ratios of the galaxies are computed by dividing the column densities of each molecule by that of C 18 O, and these ratios are then compared among the galaxies. The horizontal axis is ordered by the increasing value of the ratio APM 08279/NCv1.143 (in the case of C 34 S and HCN-VIB, where the value of NCv1.143 is missing, we use the ratio of APM 08279/NGC 253 for ordering). Circles are AGN-dominated (APM 08279, NGC 1068, and NGC 4418) over starburstdominated (NCv1.143 and NGC 253) ratios, diamonds are comparisons between similar types, and crosses are starburst-dominated over AGN-dominated ratios. The upper panel shows the ratio of the two high-redshift galaxies over local galaxies, while the lower panel shows the ratio of AGN-dominated galaxies over starburst-dominated galaxies only. significantly higher in APM 08279+5255 than in NCv1.143. The relative abundance ratio APM 08279+5255/NGC 253 shows a similar trend as APM 08279+5255/NCv1.143 -abundances of the dense gas tracers are enhanced, with the most extreme enhancement seen in C 34 S. However, when we examine the ratios of APM 08279+5255/NGC 1068 and APM 08279+5255/ NGC 4418 (AGN/AGN ratios), we do not see significantly enhanced relative abundances of the dense gas. The values of the ratios of APM 08279+5255/NGC 1068 and APM 08279+5255/ NGC 4418 (AGN/AGN) are smaller than APM 08279+5255/ NCv1.143 and APM 08279+5255/NGC 253 (AGN/starburst), and they are close to or below unity. As opposed to the ratios of APM 08279+5255/NCv1.143 and APM 08279+5255/NGC 253, we do not see systematic trends of these AGN/AGN ratios.</p><p>Conversely, when examining the abundance of NCv1.143 compared to local AGN-dominated sources (starburst/AGN), values lower than unity are consistently observed, which aligns with the higher values noted in the ratios of APM 08279+5255 over NCv1.143 and NGC 253 (AGN/starburst). This is not surprising, as the ratios of NCv1.143/NGC 1068 and NCv1.143/NGC 4418 are the inverse of the AGN/starburst ratios. When comparing NCv1.143 with NGC 253, we see a similar trend as seen in the AGN/AGN ratios (APM 08279+5255/NGC 1068 and APM 08279+5255/NGC 4418), where the values are found distributed around unity, and they are also often higher than the starburst/AGN ratios.</p><p>While the absolute abundance ratios for all the molecules in both our targets remain uncertain, distinct trends can be found in Fig. <ref type="figure">7</ref>. First, when examining each species, the AGN/starburst ratios (APM 08279+5255/NCv1.143 and APM 08279+5255/NGC 253) generally exhibit higher values that are mostly above unity, whereas the starburst/AGN ratios (NCv1.143/NGC 4418 and NCv1.143/NGC 1068) often have lower values that are mostly below unity; the sim-ilar pairs, AGN/AGN or starburst/starburst (APM 08279+ 5255/NGC 4418, APM 08279+5255/NGC 1068, and NCv1.143/ NGC 253) ratios, fall in between. This indicates that the molecular abundances in APM 08279+5255 behave like those found in the AGN-dominated sources, while the abundances in NCv1.143 resemble the starburst chemistry. Second, the dense gas tracers such as HCN, HCO + , HNC, CS, N 2 H + , and C 34 S are generally more abundant among the molecules studied in AGN-dominated sources compared to other molecules as shown in the lower panel of Fig. <ref type="figure">7</ref>. Similar trends of an enhanced abundance of these dense gas tracers relative to C 18 O have also been found in the AGN-dominated CMZ in comparison to the starburst regions in NGC 1068 <ref type="bibr">(Nakajima et al. 2023)</ref>.</p><p>The parallel between APM 08279+5255 and local AGN prototypes, coupled with the similarity in behavior of NCv1.143 to the starburst CMZ of NGC 253, suggests that the ISM chemistry in APM 08279+5255 is influenced by the central AGN, through either the high-temperature chemistry proposed by <ref type="bibr">Harada et al. (2010)</ref> or X-ray irradiate chemistry <ref type="bibr">(Meijerink et al. 2007</ref>). Correspondingly, the chemistry of the ISM in NCv1.143 likely bears a resemblance to the CMZ of NGC 253, and we do not see any significant evidence of any influence from a buried AGN in this source from the molecular abundance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2.">The [C I] line</head><p>Both galaxies are detected in the neutral carbon [C I] 3 P 1 -3 P 0 fine structure line at 492 GHz ([C I](1-0) hereafter), with luminosities &#181;L 0</p><p>[CI] of 3.55 &#8677; 10 10 K km s 1 pc 2 and 10.1 &#8677; 10 10 K km s 1 pc 2 for APM 08279+5255 and NCv1.143, respectively. The luminosity of the [C I] line is weaker in APM 08279+5255 compared with NCv1.143, which can be explained by the X-ray-dominated region (XDR) model when the column density of gas N H is around 10 24 cm 2 <ref type="bibr">(Meijerink &amp; Spaans 2005)</ref>.</p><p>A95, page 14 of 39 Yang, C., et al.: A&amp;A 680, A95 (2023) 0 1 2 3 4 5 0 200 400 600 800 E/k B (K) 1 01 1 01 1 10 2 21 2 12 2 12 2 12 2 21 3 21 3 30 3 03 3 12 3 21 3 03 3 12 3 03 3 21 3 30 3 03 3 12 4 41 4 32 4 14 4 23 4 23 4 14 4 32 4 23 4 14 4 32 4 41 4 14 5 23 5 32 5 14 5 05 5 23 5 05 5 14 5 32 5 05 5 14 5 05 5 23 5 14 5 32 5 23 5 05 H 2 O J Ka Kc ortho 1153.1 1162.9 380.2 448.0 0 1 2 3 4 5 0 00 1 11 1 11 2 20 2 02 2 11 2 02 2 11 2 20 2 02 3 31 3 13 3 22 3 22 3 13 3 13 3 22 3 31 4 22 4 40 4 31 4 13 4 04 4 04 4 22 4 31 4 04 4 13 4 04 4 22 4 13 4 31 4 40 4 04 5 24 5 15 5 33 5 33 5 15 5 24 5 15 5 24 5 33 5 15 5 15 5 24 para 987.9 752.0 1228.8 1207.6 474.7 Angular momentum quantum number J Fig. 8. Energy diagram of an H 2 O molecule. Black lines indicate the H 2 O lines detected from our line survey, while gray lines indicate the observed water transitions from other works (see Table 5 for references), with their frequencies indicated (in GHz). The H 2 O data are taken from the JPL Molecular Spectroscopy website <ref type="url">https://spec.jpl.  nasa.gov</ref>.</p><p>The [C I] emission lines allow us to derive the properties of the atomic carbon gas in these systems and compare the H 2 masses derived independently from the CO lines. We note that the reported values here are not corrected for magnification. We estimated the neutral carbon masses using Eq. ( <ref type="formula">1</ref>) in <ref type="bibr">Wei&#223; et al. (2005)</ref>, assuming a [C I] excitation temperature equal to T ex = 30 K, which is close to the value in <ref type="bibr">Walter et al. (2011)</ref>, hT ex i = 29.1 &#177; 6.3 K, and the mean temperature of hT ex i = 25.6 &#177; 1.0 K found by <ref type="bibr">Valentino et al. (2020)</ref>:</p><p>where Q(T ex ) = 1 + 3e 23.6 K/T ex + 5e 62.5 K/T ex is the partition function of [C I] and the result is expressed in units of M . The derived masses are &#181;M [CI] = (4.40 &#177; 0.17) &#8677; 10 7 M and (1.25 &#177; 0.05) &#8677; 10 8</p><p>M for APM 08279+5255 and NCv1.143, respectively.</p><p>In the case of NCv1.143, <ref type="bibr">Yang et al. (2017)</ref> reported the detection of the [C I](2-1) emission line with a line flux of 4.4 &#177; 0.9 Jy km s 1 . Assuming LTE and, under the condition that both [C I] lines are optically thin, the excitation temperature equals the kinetic temperature:</p><p>Using the measured flux of the [C I](2-1) emission line yielding &#181;L 0</p><p>[CI](2 1) = (4.9 &#177; 1.0) &#8677; 10 10 K km s 1 pc 2 (Yang et al. 2017), we derive an excitation temperature of 26.3 K for NCv1.143, close to the above-adopted value and comparable to the excitation temperatures found in previous studies of highredshift galaxies (e.g., <ref type="bibr">Nesvadba et al. 2019;</ref><ref type="bibr">Valentino et al. 2020)</ref>. As pointed out in Sect. 4.2.1, this value of T ex is likely a lower limit of T kin . This is consistent with the T kin of 20-63 K derived from the large velocity gradient (LVG) model of the CO SLED, while the [C I] excitation temperature is lower than the dust temperature T dust = 40 K in NCv1.143 <ref type="bibr">(Yang et al. 2017)</ref>. This e&#8629;ect has been pointed out by <ref type="bibr">Papadopoulos et al. (2022)</ref> via a sample of 106 galaxies, that the excitation condition of the [C I] lines are strongly sub-thermal.</p><p>Adopting an atomic carbon abundance of 8.4 &#8677; 10 5 <ref type="bibr">(Walter et al. 2011</ref>) and an excitation temperature of 30 K, we derive total molecular masses of &#181;M mol = (8.7 &#177; 0.3) &#8677; 10 10 M and (2.5 &#177; 0.1) &#8677; 10 11</p><p>M for APM 08279+5255 and NCv1.143, respectively. In the case of NCv1.143, the value is significantly smaller than the apparent molecular gas mass (5.2 &#177; 1.1) &#8677; 10 11 M derived by <ref type="bibr">Yang et al. (2017)</ref> and for APM 08279+5255 the molecular gas mass estimated by <ref type="bibr">Riechers et al. (2009)</ref> of 5.3 &#8677; 10 11</p><p>M is higher by a factor of &#8672; 2. Adopting the average L 0</p><p>[CI] /M mol conversion factor by <ref type="bibr">Dunne et al. (2022)</ref>, &#8629; [CI] = 17.0 M (K km s 1 pc 2 ) 1 , the molecular gas masses would be &#181;M mol = (6.03 &#177; 0.24) &#8677; 10 11 M and (8.3 &#177; 1.0) &#8677; 10 11 M for APM 08279+5255 and NCv1.143, respectively, which are more comparable with the CO-estimated total molecular gas masses <ref type="bibr">(Wei&#223; et al. 2007;</ref><ref type="bibr">Yang et al. 2017</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3.">Submillimeter H 2 O lines</head><p>Thanks to the observations of extragalactic H 2 O lines done by Herschel <ref type="bibr">(Pilbratt et al. 2010</ref>) and ground-based telescopes (e.g., <ref type="bibr">Omont et al. 2011</ref><ref type="bibr">Omont et al. , 2013;;</ref><ref type="bibr">Yang et al. 2013</ref><ref type="bibr">Yang et al. , 2016))</ref>, it is now established that H 2 O is one of the most important interstellar molecules after CO. It is because the submillimeter H 2 O lines are bright, capable of several key diagnostics of the ISM, and provide critical complementary information to the CO emission lines (e.g., <ref type="bibr">Gonz&#225;lez-Alfonso et al. 2010;</ref><ref type="bibr">van der Werf et al. 2011;</ref><ref type="bibr">Jarugula et al. 2019;</ref><ref type="bibr">Yang et al. 2020;</ref><ref type="bibr">Stanley et al. 2021;</ref><ref type="bibr">Pensabene et al. 2022;</ref><ref type="bibr">Decarli et al. 2023)</ref>. This is due to the combination of the high abundance and large dipole of H 2 O, as well as its rich energy-level structure and rotational excitation processes (Fig. <ref type="figure">8</ref>), including infrared pumping in dusty starburst regions (Gonz&#225;lez-Alfonso et al. 2022), and collisional excitation where the heating source is from post-shock gas and/or shock-front radiation heating in young stellar objects <ref type="bibr">(van Dishoeck et al. 2021;</ref><ref type="bibr">Dutkowska &amp; Kristensen 2023)</ref>, and the warm dense gas regions powered by warm dust heated by massive stars and/or AGN <ref type="bibr">(Liu et al. 2017</ref>). H 2 O has a central role in the oxygen chemical networks in the ISM, where H 2 O chemistry can be dominated by grain desorption, ionic reactions in typical conditions, and neutral-neutral reactions in hightemperature conditions (see the review of van Dishoeck et al.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>2013, and references therein).</head><p>For APM 08279+5255 and NCv1.143, we explored their H 2 O spectra at rest-frame frequencies below 550 GHz, where there are only three relatively strong H 2 O lines available -H <ref type="table">2 O(4 14 3 21 )</ref>, <ref type="table">H 2 O(4 23 3 30 )</ref> and <ref type="table">H 2 O(5 33 4 40</ref> ): all three are A95, page 15 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> detected in APM 08279+5255 and two of them, H 2 O(4 14 3 12 ) and H 2 O(4 23 3 30 ), in NCv1.143 (Tables <ref type="table">3</ref> and <ref type="table">5</ref>). This number may appear marginal compared to the typical strong submillimeter H 2 O lines that have been observed at rest frequencies between 557 and 1410 GHz in local starburst galaxies such as Mrk 231 and Arp 220 (e.g., <ref type="bibr">Pilbratt et al. 2010;</ref><ref type="bibr">Hayward et al. 2011;</ref><ref type="bibr">Yang et al. 2013</ref>). However, these water lines with E up /k B &#8672; 320-730 K in APM 08279+5255 and NCv1.143 can provide great insights into the ISM conditions, as demonstrated in the following subsections.</p><p>6.3.1. The 380 GHz H 2 O(4 14 3 21 ) maser line Extragalactic water masers are powerful tools for measuring masses of SMBHs and can be used to derive angular distances to the host galaxies with high precision, thus constraining critical cosmological parameters such as the Hubble constant <ref type="bibr">(Herrnstein et al. 1999;</ref><ref type="bibr">Lo 2005;</ref><ref type="bibr">Gao et al. 2016;</ref><ref type="bibr">Pesce et al. 2020)</ref>. Despite many searches for H 2 O megamasers at high redshifts, to date, only one has been reported. The 22 GHz H 2 O megamaser was identified in the z = 2.64 lensed quasar MG J0414+0534 <ref type="bibr">(Impellizzeri et al. 2008)</ref>. The H 2 O(4 14 3 21 ) line has also been detected in the same source <ref type="bibr">(Kuo et al. 2019;</ref><ref type="bibr">Stacey et al. 2020)</ref>. However, due to the complex broad line profile, it is not definitively confirmed whether this is a maser line or not.</p><p>This ortho-H 2 O(4 14 3 21 ) line at 380.197 GHz (380 GHz hereafter), with its metastable backbone level J K a ,K c = 4 14 (E up = 324 K), is one of the most promising H 2 O maser lines predicted by radiative transfer models (e.g., <ref type="bibr">Neufeld &amp; Melnick 1991;</ref><ref type="bibr">Gray et al. 2016)</ref>. The detection of the 380 GHz H 2 O in APM 08279+5255 and NCv1.143 (with signal/noise ratio, S /N &#8672; 11 and 6, respectively -see Table <ref type="table">5</ref>) is one of the most important results of our NOEMA line survey. In both sources, unlike MG J0414+0534 <ref type="bibr">(Kuo et al. 2019)</ref>, the profiles of this line have about half the width of the CO and all the other emission lines, clearly indicating a maser emission line (Fig. <ref type="figure">9</ref>). This is the highest-redshift maser detection to date. We note that the 380 GHz H 2 O is the only submillimeter H 2 O maser detected in both sources in the rest-frame frequency range of 330-550 GHz. Moreover, the 380 GHz H 2 O maser is at least four times stronger than its 22 GHz H 2 O(6 16 5 23 ) counterpart in APM 08279+5255 (undetected by <ref type="bibr">Ivison 2006</ref>). The flux is significantly bright when juxtaposed with other possible submillimeter masers <ref type="bibr">(at 355, 380, 437, 439, and 471</ref> GHz; see <ref type="bibr">Gray et al. 2016</ref>, with the exception of the 475 GHz line as described later in this section), as well as the undetected 22 GHz canonical H 2 O maser line. It is thus one of the best extragalactic H 2 O masers found so far and should be systematically searched for in high-redshift strongly lensed submillimeter galaxies.</p><p>Besides the narrow feature at the central velocity, we also identify tentative (&#8672;2.0-) detections of narrow emission features close to the 380 GHz maser line in APM 08279+5255 (Fig. <ref type="figure">9</ref>). These narrow high-velocity satellite lines of the 380 GHz maser are up to about 2000 km s 1 away from the central velocity, and they are likely originated from maser spots on an accretion disk surrounding the SMBH, similar to what has been observed in local galaxies <ref type="bibr">(Pesce et al. 2023)</ref>. If this is true, their velocities are more than twice as large compared to the highest velocity maser spots of the 22 GHz H 2 O line from a local survey of the H 2 O megamasers disks <ref type="bibr">(Kuo et al. 2011)</ref>, indicating that the accretion disk, in which the 380 GHz H 2 O masers are located, is very close to the central AGN or that the SMBH of APM 08279+5255 is much more massive than the local sources from <ref type="bibr">Kuo et al. (2011)</ref>. Taking scaling relations from local megamaser disks (e.g., <ref type="bibr">Gao et al. 2017</ref>), such a high velocity indicates a mass of &#8672;10 10 M of the SMBH in APM 08279+5255, which is consistent with estimates using other methods (e.g., <ref type="bibr">Trevese et al. 2013</ref>). However, we caution that the high-velocity satellite lines here are very tentative detections, and thus we have been carrying out ongoing follow-up observations with the Green Bank Telescope (GBT) to confirm if these features are real. A detailed analysis of the maser line, together with the follow-up GBT data, will be presented in a separate paper.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3.2.">The 448 GHz H 2 O(4 23 3 30 )</head><p>The ortho-H 2 O(4 23 3 30 ) line at 448.001 GHz is predominantly excited through the absorption of 79 and 132 &#181;m photons in the transitions 4 23 3 12 and 4 23 4 14 (Fig. <ref type="figure">8</ref>). The influence of collisional excitation on the 448 GHz H 2 O line is generally deemed negligible due to the high energy levels involved (E up /k B &gt; 400 K) and the high critical densities of these levels. The 4 23 level is thus likely mostly radiatively populated. Recently, this key H 2 O line has been detected for the first time in the ISM of both local and high-redshift galaxies, where this optically thin line is found to be a good tracer of the deeply buried nuclei A95, page 16 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> that have intense far-infrared fields <ref type="bibr">(Pereira-Santaella et al. 2017;</ref><ref type="bibr">Yang et al. 2020;</ref><ref type="bibr">Gonz&#225;lez-Alfonso et al. 2021)</ref>. This makes the 448 GHz H 2 O line particularly e&#8629;ective in tracing the elusive population of buried AGN in environments with extreme farinfrared radiation energy densities.</p><p>From Fig. <ref type="figure">5</ref>, we can see that the 448 GHz H 2 O line exhibits the most significant di&#8629;erence among all the water lines between APM 08279+5255 and NCv1.143, where this line is about nine times stronger in the quasar. This strongly indicates that there is a deeply buried radiation source with a large column of dust and gas in APM 08279+5255 that is nonetheless visible in the optical. Most importantly, the brighter 448 GHz H 2 O emission suggests that the APM 08279+5255 quasar must have a significantly more intense far-infrared field buried in the nuclear region than NCv1.143. It is worth noticing that in APM 08279+5255, we have also detected several transitions of the HCN-VIB line, which is believed to be the tracer of the compact obscured nuclei <ref type="bibr">(Aalto et al. 2015;</ref><ref type="bibr">Falstad et al. 2021)</ref>, where the column density reaches beyond 10 24 cm 2 . Comparing the ratio between the 448 GHz H 2 O with the HCN-VIB(3-2) line, we find a comparable flux ratio of about 6.1 in APM 08279+5255, which is close to the value of 7.9 &#177; 1.6 found in a local compact obscured nucleus of ESO 320-G030 <ref type="bibr">(Falstad et al. 2021;</ref><ref type="bibr">Gonz&#225;lez-Alfonso et al. 2021)</ref>. Because APM 08279+5255 is visible in the soft X-ray <ref type="bibr">(Bertola et al. 2022)</ref> as well as in the rest-frame UV and optical (e.g., <ref type="bibr">Saturni et al. 2018)</ref>, is it unclear how APM 08279+5255 is linked to the typical compact obscured nuclei in the local Universe featured by strong HCN-VIB emission but mostly no Xray detection <ref type="bibr">(Falstad et al. 2021)</ref>. Future high-spatial-resolution data are needed to have a clearer picture of the ISM structure in order to answer this question.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3.3.">The 475 GHz H 2 O(5 33 4 40 ) line</head><p>The para-H 2 O(5 33 4 40 ) at rest frame 474.689 GHz (475 GHz hereafter) has a very high upper energy level of E up = 725 K, which is even higher than the commonly observed J up = 5 H 2 O line transition 5 23 5 14 at 1411 GHz (E up = 642 K) in local galaxies <ref type="bibr">(Yang et al. 2013)</ref>. Observations of evolved stars found the 475 GHz H 2 O lines are masers associated with fast outflows <ref type="bibr">(Menten et al. 2008)</ref>.</p><p>In dusty warm dense regions of galaxies, H 2 O molecules can also absorb 53 &#181;m far-infrared photons through 5 33 4 22 (Fig. <ref type="figure">8</ref>). Such absorption features have been detected in NGC 4418 <ref type="bibr">(Gonz&#225;lez-Alfonso et al. 2012)</ref>. In this case, the high H 2 O column density can e ciently populate the 4 22 level and thus sustain this far-infrared pumping process. Such a process may potentially provide a route for the formation of H 2 O maser. Nevertheless, the observed line profile of H 2 O(5 33 4 40 ) in APM 08279+5255 is similar to those of other dense gas tracers, suggesting the H 2 O emission is from similar regions of the dense gas tracers that are tracing the bulk motion of the gas at large scales. This is contradictory to a maser origin of H 2 O emission, where commonly, a specific physical condition has to be met <ref type="bibr">(Gray et al. 2016</ref> found a typical excitation condition with a kinetic temperature of &#8672;1000 K), leading to very localized emitting regions (thus very narrow linewidths), such as accretion disks surrounding SMBHs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3.4.">Model of the H 2 O emission lines and its interpretation</head><p>Given that in both APM 08279+5255 and NCv1.143, there are detections of other H 2 O lines from the literature <ref type="bibr">(Lis et</ref> al. 2011; van der Werf et al. 2011; Yang et al. 2016; Yang 2017),</p><p>it is worth combining all the detected H 2 O lines together with the dust continuum to constrain the excitation conditions. For APM 08279+5255, there are eight H 2 O lines from J up = 2 to 5 included, while for NCv1.143, six H 2 O lines are included (Table <ref type="table">5</ref>, Figs. <ref type="figure">5</ref> and <ref type="figure">8</ref>). Here, we assume that the H 2 O submillimeter excitation is dominated by the absorption of farinfrared dust-emitted photons, with additional contribution from collisional excitations. Then, we used the radiative transfer model carried out by <ref type="bibr">Gonz&#225;lez-Alfonso et al. (2014b</ref><ref type="bibr">, 2021)</ref> to constrain the physical properties of the dusty ISM. Here we adopt a magnification of &#181; &#8672; 4 <ref type="bibr">(Riechers et al. 2009)</ref> for APM 08279+5255 and &#181; &#8672; 9 for NCv1.143 (Appendix C), and all the following H 2 O analysis are performed after lensing correction.</p><p>The model assumes a number N C of independent components, which are spherically symmetric sources with uniform physical properties, namely: the dust temperature T dust , the continuum optical depth at 100 &#181;m along a radial path &#8999; 100 , the column density of H 2 O along a radial path N H 2 O , the H 2 density n H 2 , the velocity dispersion V, and the gas temperature T gas . The model components are classified into groups according to their physical parameters, each group covering a regular grid in the parameter space (T dust , &#8999; 100 , N H 2 O , n H 2 ). However, it should be noted that the conditions of the gas that the H 2 O lines trace can be di&#8629;erent from the CO-traced conditions. We keep fixed V = 100 km s 1 and T gas = 150 K (which is the typical condition and the models are insensitivity to the choice of T gas = 150 K, Gonz&#225;lez-Alfonso et al. 2021). For both APM 08279+5255 and NCv1.143, N C = 2 is required to obtain a satisfactory fit to the data, as shown below.</p><p>Radiative pumping by far-infrared radiation means that H 2 O is sensitive to the dust SED, and thus, our goal is to fit the H 2 O SLED and the far-infrared SED simultaneously. For this purpose, we use as input data of our minimization method the fluxes of the H 2 O lines (and the upper limit of the H 2 O,448 GHz line in NCv1.143) and a number N cont of continuum flux densities. For APM 08279+5255 N cont = 2 (at rest &#8673; 51 and 677 &#181;m), while we use N cont = 6 for NCv1.143. These continuum data are highlighted in magenta in the SEDs in Figs. 10 and 11. In our method, 2 is minimized for all possible combinations among the N C components, giving for each one the squared radius R 2 of each component. The best-fit (fiducial) model is the combination that yields the minimum 2 , and the regular grid enables the estimation of the likelihood of each parameter. The derived parameters -R, the H 2 O abundance relative to H nuclei X H 2 O , L IR , and M gas of each component -are also inferred. More details are given in Gonz&#225;lez-Alfonso et al. <ref type="bibr">(2021)</ref>.</p><p>We first attempted to fit the H 2 O and continuum emission with a single-model component (N C = 1), but results were unreliable, with a best-reduced 2 value 2 red &#8673; 4. This was indeed expected because the low-lying H 2 O J up = 2-3 lines are expected to arise in more extended regions than the J up = 4 lines that trace buried regions (e.g., <ref type="bibr">Gonz&#225;lez-Alfonso et al. 2014a;</ref><ref type="bibr">Pereira-Santaella et al. 2017)</ref>. A better fit was found with N C = 2 components, with 2 red &#8673; 0.9; in Figs. 10 and 11, the arrows indicate the best-fit values and solid histograms show their likelihood distributions.</p><p>In both galaxies, we find that the J up 4 lines are formed in a warm "compact" component (R &#8672; 330 pc and &#8672;150 pc in APM 08279+5255 and NCv1.143, respectively), which we identify with the nuclear region (nuclear core). The nuclear cores are moderately optically thick in the far-infrared with &#8999; 100 &#8672; 2, with warm dust temperatures of over 100 K (Figs. <ref type="figure">10</ref> and <ref type="figure">11</ref>). In NCv1.143, this core has an intrinsic luminosity of L IR &#8672; 4 &#8677; A95, page 17 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> Fig. <ref type="figure">10</ref>. Best-fit model and the likelihood of the parameters from the model of the H 2 O lines and the dust continuum in APM 08279+5255. Top left: Observed lensing-corrected (black data points) versus modeled H 2 O integrated flux (green and blue are the extended and compact components, respectively; red is the total). Bottom-left: Lensing-corrected modeled dust SED from the two components (same colors as in the top panel). The photometric data are taken from <ref type="bibr">Leung et al. (2019)</ref>. Right panels: Likelihood distributions of the key parameters of the H 2 O model, with the same colors as in the left panels. The arrows indicate the maximum likelihood values (Table <ref type="table">6</ref>). 10 12</p><p>L , resulting in an extreme infrared luminosity surface density</p><p>L kpc 2 . This translates into a surface SFR value of SFR/(&#8673; R 2 ) &#8672; 6.2&#8677;10 3 M yr 1 kpc 2 if the contribution to L IR by a possible obscured AGN is negligible since no strong evidence of the presence of an AGN has been found in NCv1.143 <ref type="bibr">(Yang et al. 2016)</ref>. In APM 08279+5255, however, the compact nuclear core has an extreme luminosity of L IR &#8672; 4 &#8677; 10 14</p><p>L that results in &#8963; IR = 3 &#8677; 10 14 L kpc 2 . Obviously, this can only be explained by a significant contribution of radiation from the AGN.</p><p>On the other hand, the J up &#63743; 3 lines in both galaxies, pumped by absorption of dust-emitted 101 and 75 &#181;m photons, are formed in a more extended R &#8672; 1 kpc starburst region with moderate T dust &#8672; 50 K, most likely the circumnuclear disk of the host. In NCv1.143, this size is comparable to the projected half-light e&#8629;ective radius traced by the H 2 O(2 11 2 02 ), H 2 O(3 21 3 12 ) and CO(10-9) line emission as presented in Appendix C (Fig. <ref type="figure">C</ref>.2), and also to the size of the averaged 870 &#181;m dust continuum of submillimeter galaxies (SMGs, R &#8672; 1 kpc; <ref type="bibr">Gullberg et al. 2019</ref>). The circumnuclear disk in Notes. (a) 90% confidence intervals; (b) Values for the fiducial best-fit model, selected for detailed comparison with data, while the uncertainties of the derived parameters are well-characterized in Figs. 10 and 11.</p><p>NCv1.143 dominates the luminosity with L IR &#8672; 6.5&#8677;10 12 L and &#8963; IR = 6 &#8677; 10 11</p><p>L kpc 2 (corresponding to &#8672;230 M yr 1 kpc 2 ). We note that excluding the continuum flux density at 51 &#181;m in the fit of APM 08279+5255 yields a very similar bestfit model, with the far-infrared and mid-infrared continuum emission well fitted. The estimate of very warm T dust of the nuclear region is mainly driven by the H 2 O(5 33 4 40 ) 475 GHz line. This means that the H 2 O lines are indeed tracing the shape of the SED, and high columns of H 2 O are present in the inner &#8672;0.5 kpc in APM 08279+5255 provided that these nuclear regions (still) have large reservoirs of gas of &#8672;10 10 M . It is also worth noting the similarities and di&#8629;erences between the two sources. Despite their di&#8629;erent SEDs, the extended circumnuclear disks have similar characteristics in APM 08279+5255 and NCv1.143 (see Table <ref type="table">6</ref>). For the compact core, most of the parameters in Table <ref type="table">6</ref> are also similar between APM 08279+5255 and NCv1.143. However, the dust temperature and infrared-luminosity of the core in APM 08279+5255 are significantly higher than those in NCv1.143. As shown in Figs. <ref type="figure">10</ref> and <ref type="figure">11</ref>, the compact nuclear core in APM 08279+5255 is dominating the total infrared luminosity of the entire galaxy, while in NCv1.143, the extended circumnuclear disk has a much larger contribution to the total infrared luminosity. Therefore, as diagnosed by the H 2 O lines, the main di&#8629;erence between the two sources is a much more prominent and powerful nuclear core component, indicating the "turn-on" phase of the extreme quasar in APM 08279+5255, which may be a short-lived phenomenon.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.4.">H 3 O + lines</head><p>As a symmetric top molecule, H 3 O + plays an important role in the oxygen chemistry network that is related to the H 2 O formation in ion-neutral reactions <ref type="bibr">(Gerin et al. 2016)</ref>. First detections of the H 3 O + lines were achieved in two local starburst galaxy, M 82 and Arp 220, from the transition of p-H 3 O + (3 + 2 2 2 ) at 364.797 GHz, with E up /k B = 139 K (van der Tak et al. 2008, see also <ref type="bibr">Sakamoto et al. 2021</ref>). H 3 O + has also been detected in the Cloverleaf quasar <ref type="bibr">(Gu&#233;lin et al. 2022)</ref>. Another study of five local galaxies utilized the abundance ratios of H 3 O + with H 2 O and HCO + and found the chemistry in XDRs can explain some of the high column density ratios of H 3 O + over H 2 O and HCO + in some sources <ref type="bibr">(Aalto et al. 2011)</ref>.</p><p>Both the H 3 O + (3 + 2 2 2 ) and H 3 O + (3 + 0 2 0 ) lines are robustly detected in APM 08279+5255. These are the first high-redshift detections of any H 3 O + lines. While in NCv1.143, these two lines are below the noise level; therefore, we do not discuss NCv1.143 in detail here until further robust detections are reached. The LTE-derived column density of H 3 O + is about N H 3 O + &#8672; 10 15 cm 2 after lensing correction. This value is comparable with NGC 253, NGC 1068, and NGC 6240, where the XDR and/or a high CR ionization rate in the photodissociationdominated region (PDR) can explain the column density <ref type="bibr">(Aalto et al. 2011)</ref>.</p><p>The abundance ratio between H 3 O + and H 2 O can also be used as a probe of ionization states. Using the H 2 O column density derived from Sect. 6.3.4 of 2.5 &#8677; 10 17 cm 2 , we find a relative abundance ratio of H 3 O + /H 2 O,&#8672; 3 &#8677; 10 3 , which can be explained by both the PDR and the XDR <ref type="bibr">(Riechers et al. 2009)</ref>. Indeed, H 3 O + lines have also been detected in the pure-starburst NGC 253 <ref type="bibr">(Mart&#237;n et al. 2021;</ref><ref type="bibr">Holdship et al. 2022)</ref>. While the aforementioned diagnostics are inconclusive, the most evident abundance ratio that suggests the XDR plays an important role comes from H 3 O + /HCO + , where in APM 08279+5255 we find a very large abundance ratio of &#8672; 40, which is di cult to explain by PDRs <ref type="bibr">(Meijerink et al. 2007</ref>). This suggests that the XDR may significantly influence the abundances of HCO + and H 3 O + abundances in APM 08279+5255, though the possibility of H 3 O + enhancement by CR cannot be entirely ruled out.</p><p>A95, page 19 of 39 Yang, C., et al.: A&amp;A 680, A95 (2023) HCN HCO + HNC CS C 34 S log 10 (n H 2 [cm -3 ]) APM08279+5255 T kin [K ] log 10 (N mol /dv [cm -2 /km s -1 ]) 8 7 6 5 4 HCN HCO + HNC CS C 34 S HCN HCO + HNC CS C 34 S 18 17 16 15 14 13 12 NCv1.143 8 7 6 5 4 10 3 10 2 10 3 10 2 18 17 16 15 14 13 12 NCv1.143 NCv1.143 APM08279+5255 APM08279+5255 Fig. 12. Violin plots for the LVG-MCMC-derived posterior distributions of n H 2 , T kin , and N mol /dV in APM 08279+5255 and NCv1.143 (upper and lower panels, respectively). The white dot represents the median values, while the solid blue and dashed blue lines represent &#177;1 and &#177;2 , respectively. The violin shapes represent the posterior distributions of each parameter as presented in the corner plots (Figs. B.1 and B.2).</p><p>6.5. Typical high dipole moment tracers -HCN, HCO + , HNC, CS and C 34 S -and non-LTE modeling</p><p>Because of their large dipole moment, the consensus is that the lines of HCN, HCO + , HNC, and CS are probably among the best tracers of dense gas where stars are forming. This is demonstrated by the linear correlation between the line luminosity of the dense gas tracers, especially HCN, and L IR , which holds tightly over ten orders of magnitude, ranging all the way from dense cores of Giant Molecular Clouds to ultra-luminous infrared galaxies (e.g., <ref type="bibr">Gao &amp; Solomon 2004;</ref><ref type="bibr">Wu &amp; Evans 2005;</ref><ref type="bibr">Gao et al. 2007;</ref><ref type="bibr">Zhang et al. 2014;</ref><ref type="bibr">Chen et al. 2015;</ref><ref type="bibr">Jim&#233;nez-Donaire et al. 2019;</ref><ref type="bibr">Zhou et al. 2022)</ref>. Unlike the super-linear correlation found between the SFR and the total molecular gas traced by CO(1 0), the tight relation between the dense gas and the SFR suggests that the dense gas links more tightly with star formation rather than CO(1 0) <ref type="bibr">(Gao &amp; Solomon 2004)</ref>. Therefore, the dense gas tracers such as HCN, HCO + , HNC, and CS serve as crucial probes for understanding the most intense star formation in the SMGs. Nevertheless, the detection of the standard dense gas tracers remains meager at high redshifts because the emission lines of these dense gas tracers are very weak compared to CO. HCN is only reported in a handful of individual luminous high-redshift galaxies and only detected in strongly lensed sources <ref type="bibr">(Vanden Bout et al. 2004;</ref><ref type="bibr">Carilli et al. 2005;</ref><ref type="bibr">Gao et al. 2007;</ref><ref type="bibr">Riechers et al. 2007</ref><ref type="bibr">Riechers et al. , 2011a;;</ref><ref type="bibr">Carilli &amp; Walter 2013;</ref><ref type="bibr">Oteo et al. 2017;</ref><ref type="bibr">B&#233;thermin et al. 2018;</ref><ref type="bibr">Ca&#241;ameras et al. 2021;</ref><ref type="bibr">Rybak et al. 2022</ref><ref type="bibr">Rybak et al. , 2023))</ref>. These lines provide the essential signature of massive starbursts, and it has been suggested that the dense gas fraction, as derived from the comparison between HCN and low-J CO lines, is higher in the high-redshift dusty star-forming galaxies <ref type="bibr">(Oteo et al. 2017)</ref>, though <ref type="bibr">Rybak et al. (2022)</ref> argue that there is no di&#8629;erence in dense gas fractions. In our NOEMA line survey, we have acquired the largest amount of multiple transitions of several dense gas tracers to date, including HCN, HCO + , HNC, CS, C 34 S, NO, and N 2 H + simultaneously in single objects. This enables us to under-</p><p>Table 7. Physical parameters derived from the LVG models. stand the gas excitation conditions by directly looking into each species; thus, we are able to perform excitation analysis via the LVG method (e.g., Goldreich &amp; Kwan 1974) for APM 08279+5255, where at least three transitions are detected per molecule. For NCv1.143, using some strict priors based on the previous studies of this source, we can also get loose constraints of the excitation conditions (the lack of data constraints here is well reflected by the posteriors of the parameters, Fig. <ref type="figure">12</ref> and Appendix B), where only two transitions are detected for most of the dense gas tracers. For the purpose of comparing APM 08279+5255 and NCv1.143, we picked HCN, HCO + , HNC, CS, and C 34 S for a detailed non-LTE analysis for the ISM conditions (N 2 H + is excluded in the LVG analysis due to the lack of collisional rates data).</p><p>A95, page 20 of 39 Table 7), and light-yellow lines indicate 100 examples within the 15.87% and 84.14% quartiles of the posteriors.</p><p>Following the same implementation as described in <ref type="bibr">Yang et al. (2017)</ref>, we use a one-dimensional (1D) non-LTE radiative transfer code RADEX (van der <ref type="bibr">Tak et al. 2007)</ref>, assuming an escape probability of = (1 e &#8999; )/&#8999; from an expanding sphere geometry <ref type="bibr">(Sobolev 1960</ref>) to model the observed flux. At the same time, we also adopted the MCMC code emcee as we fit the integrated line flux of the SLED for HCN, HCO + , HNC, and CS for both APM 08279+5255 and NCv1.143, as well as C 34 S for APM 08279+5255. Here, we do not simultaneously fit all the tracers with a single condition because they do not trace the same gas conditions <ref type="bibr">(Tielens 2005</ref>). The collisional rates are taken from the LAMDA database <ref type="bibr">(Sch&#246;ier et al. 2005)</ref>. After deploying 100 walkers with 1000 interactions after 100 burn-in steps, we derive the posterior distributions of the kinetic temperature of the molecular gas (T kin ), the volume density of H 2 (n H 2 ), and the column density of each molecule unit velocity di&#8629;erence (N mol /dV), and the solid angle (&#8998; app ) of the source where the lensing magnification factor is included.</p><p>Table <ref type="table">7</ref> lists the results from the LVG-MCMC analysis, while the fitted SLEDs are shown in Fig. <ref type="figure">13</ref>. The LVG models can well reproduce the observed integrated fluxes. However, it is worth noticing that the J up = 5 HNC line is about 40% brighter than the LVG model (over 1 level). It is di cult to explain such a flux excess of the J up = 5 HNC line. One possible cause is the blending by the CN(4-3) line. Nevertheless, our current data limit the ability to assess this possibility thoroughly, and we do not see a similar overestimate of the HNC(5-4) flux in NCv1.143. Thus, the source of the flux excess of the HNC(5-4) line remains elusive.</p><p>In order to facilitate a more e&#8629;ective comparison of the results from our LVG-MCMC analysis, we present the posterior distributions of the two sources using the violin plots in Fig. <ref type="figure">12</ref>. It becomes apparent that all the n H 2 values derived from HCN, HCO + , HNC, CS, and C 34 S significantly exceed that of the CO from previous studies <ref type="bibr">(Wei&#223; et al. 2007 and</ref><ref type="bibr">Yang et al. 2017</ref>, n H 2 &#8672; 10 3 -10 4 cm 3 ), falling within the range of 10 5 -10 7 cm 3 . A95, page 21 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> This is not surprising as these mid-J lines of the dense gas tracers probe more extreme conditions of the high-density ISM than the CO lines. Within APM 08279+5255, the gas density traced by HCO + is markedly lower compared to that traced by all other molecules. As for the kinetic temperature, T kin , all tracers align to suggest a similar value of approximately 100 K. When examining the column density values derived from the LVG analysis, APM 08279+5255 displays well-defined values, with most of the species falling within the 10 14 -10 15 cm 2 /km s 1 range. Notably, we observe that the column density of HCO + is significantly below other species, particularly in APM 08279+5255.</p><p>When compared with the LVG-derived column densities and assuming a small dV, the abundances of APM 08279+5255 and NCv1.143 align with the MADCUBA LTE-derived values listed in Table <ref type="table">4</ref>. The only exception is the CO abundance of NCv1.143, where the LVG-derived value is one order of magnitude smaller in NCv1.143. The LVG-derived values confirm the trend we found in Fig. <ref type="figure">7</ref> that the relative abundance of the dense gas tracers seems all boosted in the quasar where AGN is dominated. In the next section, we take a closer look at how di&#8629;erent ISM environments might a&#8629;ect the abundance of the dense gas tracers in the two sources.</p><p>6.6. AGN diagnostics with HCN, HCO + , HNC and CS Here, we place the observed line flux ratios from high dipole moment tracers from our line surveys into what has been reported within the local Universe. A number of molecular line ratios have been proposed as tracers of the powering sources and/or physical conditions within the obscured central regions of bright galaxies.</p><p>The ratio between the HCN and HCO + is a classic molecular discriminator of nuclear regions dominated by either a starburst or an AGN (e.g., <ref type="bibr">Kohno et al. 2001;</ref><ref type="bibr">Krips et al. 2008;</ref><ref type="bibr">Imanishi et al. 2023)</ref>. Observations of a statistically significant sample with low spatial resolutions have shown that an enhancement of the HCN/HCO + can occur in galaxies hosting an AGN <ref type="bibr">(Privon et al. 2015;</ref><ref type="bibr">Izumi et al. 2016;</ref><ref type="bibr">Imanishi et al. 2016</ref>). However, <ref type="bibr">Privon et al. (2020)</ref> found no trends between HCN/HCO + and the AGN fraction from hard X-ray observations. Highresolution imaging of nearby AGN galaxies has shown this enhancement to be located in the circumnuclear disk and not directly toward the AGN position <ref type="bibr">(Viti et al. 2014;</ref><ref type="bibr">Mart&#237;n et al. 2015)</ref>, which is claimed to be the result of high-temperature chemistry due to mechanical heating in the surrounding of the AGN <ref type="bibr">(Izumi et al. 2013;</ref><ref type="bibr">Harada et al. 2010)</ref>. All these local studies show the complex nature of the HCN/HCO + diagnostics. <ref type="bibr">Izumi et al. (2016)</ref> proposed a diagnostic diagram based on the ratios of HCN/HCO + (4-3) and HCN(4-3)/CS(7-6), which we cover in our observations. We derive HCN/HCO + ratios of 1.4&#177;0.2 and 1.6&#177;0.2 toward APM 08279+5255 and NCv1.143, respectively. Similar ratios are obtained with the J = 5-4 and 6-5. The HCN/CS ratio is measured to be between 3 and 4<ref type="foot">foot_1</ref> and 6.7&#177;3.3, for APM 08279+5255 and NCv1.143, respectively.</p><p>The ratios derived for the quasar APM 08279+5255 are not distinctive from what is observed toward starburst-dominated galaxies. This is not uncommon and matches what is observed in other observations of AGN at a low spatial resolution, which shows a wide range of ratios <ref type="bibr">(Privon et al. 2015;</ref><ref type="bibr">Izumi et al. 2016;</ref><ref type="bibr">Imanishi et al. 2016)</ref>. Conversely, the ratios observed toward the starburst NCv1.143 are very uncertain and might lie within the range where only galaxies with an AGN are found.</p><p>Although we could expect these ratios to be a&#8629;ected by continuum absorption or self-absorption from intervening material, the analysis from <ref type="bibr">Imanishi et al. (2016)</ref> showed that line flux ratios are only moderately a&#8629;ected by such e&#8629;ects. Since we do not find any AGN footprint in NCv1.143 <ref type="bibr">(Yang et al. 2016)</ref>, especially from the absence of detection in radio and in the mid-infrared bands of the Wide-field Infrared Survey Explorer (WISE; <ref type="bibr">Wright et al. 2010)</ref>, a buried AGN is unlikely to reside in NCv1.143. However, the sensitivity and the angular resolution of our data on the CS, HCN, and HCO + lines are limited to reaching conclusions on whether they actually point to the presence of such an AGN, although we do see general trends of the abundance di&#8629;erence between AGN-and starburst-dominated sources as discussed in Sect. 6.1, and NCv1.143 is aligned with the non-AGN-dominated abundances.</p><p>The abundance ratios we derived for APM 08279+5255 and NCv1.143, expressed as N(HCN)/N(CS), are given in log base ten as 0.7 +1.3</p><p>1.1 and 0.1 +2.5 2.7 , respectively. These correspond to the values of N(HCN)/N(CS) ratios of about 0.2 and 0.8 for APM 08279+5255 and NCv1.143, respectively, with large uncertainties. Compared with a detailed case study of the chemical networks in NGC 1068 <ref type="bibr">(Butterworth et al. 2022)</ref>, where AGN tends to enhance N(HCN)/N(CS), our values do not show such clear evidence of the enhancement. This is not surprising considering the large uncertainties of the abundance ratios and low spatial resolution of our measurements. The abundance ratios of N(HCN)/N(HCO + ) for APM 08279+5255 and NCv1.143 are 2.3 +1.1</p><p>1.3 and 0.6 +2.0 2.4 in log base ten, which might show a significant abundance enhance of HCN over HCO + . This is consistent with what has been found in the AGN-dominated nuclear regions of NGC 1068, at 40 pc to 100 pc scales. If such similarities are valid, it also indicates that the spatial distribution of HCN and HCO + are similar, as the case in NGC 1068 <ref type="bibr">(Butterworth et al. 2022</ref>). Thus, their abundance ratio is a better representation of a consistent inference of their ISM condition compared to the abundance ratios of N(HCN)/N(CS).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.7.">CCH</head><p>The ethynyl radical, CCH, is abundant in the ISM and is known to be enhanced in PDRs, both from galactic and extragalactic observations, although ionizing processes such as CR ionizing could also be responsible for the CCH production <ref type="bibr">(Mart&#237;n et al. 2014;</ref><ref type="bibr">Holdship et al. 2021</ref>, see the discussion and references therein).</p><p>In this work, we observed line ratios of CCH over HCN, HCO + , and HNC using their J = 5-4 transitions of 0.29/0.37/0.46 and 0.29/0.46/0.48, toward APM 08279+5255 and NCv1.143, respectively. These ratios fall within the ratios presented by <ref type="bibr">Mart&#237;n et al. (2014)</ref> over a small sample of galaxies with a variety of environments. We do not see any particular flux enhancement of the CCH lines in our targets. However, when we compare the relative abundances from the LTE analysis directly, we find that CCH is more abundant in APM 08279+5255 than in NCv1.143. This is consistent with an enhancement of CCH abundance in the region dominated by AGN and shocks <ref type="bibr">(Nakajima et al. 2023</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.8.">CH lines</head><p>The methydilyne radical, CH, is a major interstellar molecule both in the di&#8629;use and dense ISM, as well as in XDRs A95, page 22 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref>  (e.g., <ref type="bibr">Gerin et al. 2016)</ref>, typically tracing densities n H of 100-5000 cm 3 and temperatures of 15-100 K <ref type="bibr">(Snow &amp; McCall 2006)</ref>. It was one of the very first interstellar molecules detected through its visible bands in the optical and later through its &#8676;doublet lines in the ground state in radio frequencies. CH is one of the key probes of the di&#8629;use ISM. Its absorption lines have been detected in the foreground galaxy at z = 0.89 toward the quasar PKS 1830-211 <ref type="bibr">(Muller et al. 2014</ref><ref type="bibr">(Muller et al. , 2023))</ref>. However, its study in the ISM of local galaxies is limited by the absence of millimeter lines and the complete atmospheric absorption of its first submillimeter transition at &#8672;530 GHz <ref type="bibr">(Jacob et al. 2021</ref>).</p><p>The lowest spin-rotational (560 &#181;m) transition of CH has six hyperfine components grouped at 532.8 and 536.8 GHz. They were detected in four nearby galaxies, NGC 1068, Arp 220, M 82, and NGC 253, using the Herschel <ref type="bibr">(Rangwala et al. 2011</ref><ref type="bibr">(Rangwala et al. , 2014))</ref>, who found that the CH lines were a factor of &#8672;20 brighter than the adjacent HCN and HCO + lines.</p><p>While this frequency range was not covered for NCv1.143, the two groups of hyperfine components of the CH(4-3) transition were detected with S /N &gt; 4 in APM 08279+5255 (Table <ref type="table">5</ref>). This is the first clear detection of CH in an individual high-redshift galaxy, although <ref type="bibr">Spilker et al. (2014)</ref> presented a marginal 2.5-detection of these lines in the stacked spectrum of the dusty star-forming galaxies selected by the South Pole Telescope survey.</p><p>As shown in Table <ref type="table">8</ref>, the ratio of CH lines to adjacent J = 6-5 lines of HCN and HCO + is more than an order of magnitude lower in APM 08279+5255 than that in the local galaxies observed by <ref type="bibr">Rangwala et al. (2014)</ref>. This holds true even for NGC 1068 and Arp 220, where the ratios are lower by a factor of approximately 20. The origin of such a substantial di&#8629;erence is challenging to comprehend without a detailed comparison to other high-redshift starbursts and AGN galaxies. Additionally, a higher angular resolution of APM 08279+5255 would be beneficial in better understanding the origin of the CH emission, shedding light on the cause of the CH "deficit." As the maximum factor of di&#8629;erential lensing reaches only up to 3 <ref type="bibr">(Riechers et al. 2009)</ref> in APM 08279+5255, it is unlikely the explanation. Interestingly, however, the average CH/HCO + ratio in the stacked spectrum of SPT-discovered dusty galaxies appears intermediate, with an approximate value of 0.5 &#177; 0.2 <ref type="bibr">(Spilker et al. 2014</ref>), a factor of six times smaller than the local values. In contrast, the CH/HCO + flux ratios reach as high as &#8672;4-5 in the stacked spectrum of the Herschel lensed sources <ref type="bibr">(Hagimoto et al. 2023</ref>). In the absence of alternative explanations, the primary cause of the weakness of the CH lines in APM 08279+5255 might be due to the destruction of CH by the strong quasar UV field, which is akin to the weak [C I] emission in APM 08279+5255 compared with NCv1.143.</p><p>Taking the LTE-derived column densities, we derive a relative abundance ratio between CO and CH in APM 08279+5255 of CH/CO &#8672; 8 &#8677; 10 5 . Unlike the typical Milky Way condition where the di&#8629;use gas is dominating the CH emission, in typical fully shielded molecular regions, the CH/CO abundance ratio is expected to be about 10 4 <ref type="bibr">(She&#8629;er et al. 2008)</ref>, which is consistent with our finding in APM 08279+5255, suggesting the CH lines are unlikely to arise from di&#8629;use gas in APM 08279+5255. Such an abundance ratio is higher than the value found in Arp 220, M 82, and NGC 253 <ref type="bibr">(Rangwala et al. 2014</ref>) by at least a factor of 2. However, the abundance ratio of APM 08279+5255 is very close to that of NGC 1068, where the XDR is likely driving the high abundance of CH. This is also consistent with our previous finding of the abundance comparison between AGN and non-AGN sources (Sect. 6.1), as well as the explanation of the abundance ratio of H 3 O + /HCO + (Sect. 6.4). If CH/CO ratios are indeed a robust XDR tracer as proposed in <ref type="bibr">Rangwala et al. (2014)</ref>, future observations of the CH lines in starburst galaxies will be revealing, and we will be able to compare the abundance ratios between AGN and non-AGN sources to test the assumption. If the test is successful, the CH/CO ratio can be further used as a diagnostic tool for high-redshift ISM observations to detect XDR imprints.</p><p>6.9. CO isotopologs: 13 CO and C 18 O CO isotopologs are conceivably promising tracers of stellar IMF in high-redshift dust-enshrouded starburst galaxies (e.g., <ref type="bibr">Danielson et al. 2013;</ref><ref type="bibr">Romano et al. 2017;</ref><ref type="bibr">Zhang et al. 2018)</ref>. In those galaxies, the flux ratio of 13 CO/C 18 O may be assumed to be close to the isotope ratio 13 C/ 18 O if both lines of 13 CO and C 18 O are optically thin (however, we caution that in very highdensity gas, the 13 CO lines may have a moderate optical depth; see Appendix D). The isotopes, 13 C and 18 O, predominantly originate from low-to intermediate-mass stars (less than 8 M ) and massive stars (greater than 8 M ), respectively. Therefore, the flux ratio 13 CO/C 18 O, which represents their abundance ratio, can serve as a dust-insensitive stellar IMF probe. <ref type="bibr">Zhang et al. (2018)</ref> demonstrated that low flux ratios 13 CO/C 18 O, approaching unity, found in a sample of starburst galaxies can be interpreted as evidence of a top-heavy stellar IMF. This implication can be further substantiated by high flux ratio values of CO/ 13 CO, specifically those exceeding 20. <ref type="bibr">Zhang et al. (2018)</ref> present deep observations of the three isotopologs -CO, 13 CO and C 18 O -toward four high-redshift lensed galaxies, including three starbursts and one quasar. They found flux ratios 13 CO/C 18 O and CO/ 13 CO ranging from 1.0 to 1.6 and from 20 to 25, respectively, which can be interpreted as evidence for a top-heavy stellar IMF. In the spectral surveys reported here, we detected all three CO isotopologs in NCv1.143 in the J = 3-2 and 4-3 transitions and, in APM 08279+5255 in the J = 4-3 transition (Table <ref type="table">5</ref>). However, the 13 CO(4-3) line is blended with the CS(9-8) line, which is blueshifted with respect to 13 CO(4-3) by only 26 km s 1 . Therefore, the value given for the flux of the blended line in Table <ref type="table">5</ref> should be corrected for the contribution of the CS(9-8) line. The flux of this line may be estimated by interpolation between the observed values of the CS(8-7) and CS(10-9) lines, assuming a smooth excitation SLED shape. We also acknowledge the substantial uncertainties of the integrated fluxes of the CS lines in NCv1.143 (Table <ref type="table">5</ref>), which we take into consideration when computing the line ratios conservatively as upper and lower limits. These ratios listed in Table <ref type="table">9</ref> are consistent for the 3-2 and 4-3 lines, and their values for both sources -13 CO/C 18 O . 1 and CO/ 13 CO &amp; 20 -are A95, page 23 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> Table <ref type="table">9</ref>. CO isotopolog ratios.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Line ratios</head><p>Isotopologue line ratio APM NC 13 CO(4 3)/C 18 O(4 3) 1.10 &#177; 0.4</p><p>.1 13 CO(3 2)/C 18 O(3 2) -0.66 &#177; 0.27 12 CO(4 3)/ 13 CO(4 3) 17 &#177; 5.3 &amp;26 12 CO(3 2)/ 13 CO(3 2) -28 &#177; 9</p><p>Notes. APM stands for APM 08279+5255 and NC for NCv1.143.</p><p>comparable to the values reported by <ref type="bibr">Zhang et al. (2018)</ref>. The similar isotopolog ratios can be interpreted as evidence for a top-heavy stellar IMF in both APM 08279+5255 and NCv1.143, with implications for parameters derived using common assumptions about the IMF, SFR, and stellar mass.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.10.">Rotational lines of the vibrationally excited HCN</head><p>From our NOEMA line survey, we have detected for the first time emission lines from the vibrationally excited state v 2 = 1 f of HCN (HCN-VIB hereafter) at high redshifts. In the APM 08279+5255 quasar, all three transitions of HCN-VIB, 6-5, 5-4, and 4-3, are detected (Table <ref type="table">5</ref>). These HCN-VIB lines have very high energy levels that exceed 1050 K <ref type="bibr">(Aalto et al. 2015)</ref>, suggesting that our detection of the bright HCN-VIB lines are unlikely caused only by collisional excitation because of the extreme physical conditions needed <ref type="bibr">(Ziurys &amp; Turner 1986)</ref>. In local galaxies, observations of the HCN-VIB lines found that the most common process powering these lines involve radiative pumping from the midinfrared (such as 14 &#181;m), where HCN-VIB is absorbing the mid-infrared in the most obscured regions where N H reach beyond 10 24 -10 25 cm 2 , then releasing the energy via its emission at submillimeter and millimeter bands through the HCN-VIB lines, forming the so-called compact obscured nuclei (e.g., <ref type="bibr">Sakamoto et al. 2010;</ref><ref type="bibr">Imanishi &amp; Nakanishi 2013;</ref><ref type="bibr">Aalto et al. 2015</ref><ref type="bibr">Aalto et al. , 2019;;</ref><ref type="bibr">Gonz&#225;lez-Alfonso &amp; Sakamoto 2019;</ref><ref type="bibr">Falstad et al. 2019</ref><ref type="bibr">Falstad et al. , 2021))</ref>. This makes the HCN-VIB lines a powerful tool for probing the presence of extremely obscured nuclei.</p><p>Based on the observed integrated flux of the HCN-VIB (4-3) line listed in Table <ref type="table">5</ref>, we estimate line luminosities of L HCN-VIB(4 3) = (2.5 &#177; 1.0) &#8677; 10 7</p><p>L for APM 08275+5255. This yields a luminosity ratio of L HCN-VIB(4 3) /L IR = (2.9 &#177; 1.2) &#8677; 10 7 . This value is at the high end of the ratios found in compact obscured nuclei and an order of magnitude above the threshold of 10 8 considered to enter the criteria of a compact obscured nucleus <ref type="bibr">(Falstad et al. 2021)</ref>. Nevertheless, the HCN-VIB line luminosity could be overestimated if the emitting region is much more compact than the dust continuum and is located at the caustic lines, though we argue that the di&#8629;erential lensing is insignificant (Sect. 8). While, for NCv1.143, a 3 upper limit of the HCN-VIB lines of 0.13 Jy km s 1 results in a limit to its luminosity of L HCN-VIB(4 3) &lt; 1.1 &#8677; 10 7 L , about a factor of 2-3 below the detected line luminosity in APM 08279+5255. Such a big di&#8629;erence in the HCN-VIB line between APM 08279+5255 and NCv1.143 highlights the fact that the nuclear region of the APM 08279+5255 quasar resides in a much more intense infrared radiation field than NCv1.143. This is consistent with the conclusions we derived from our H 2 O excitation model in Sect. 6.3.4. Nevertheless, the upper limit of the ratio L HCN-VIB(4 3) /L IR &lt; 9 &#8677; 10 7 in NCv1.143 is still com-patible with a compact obscured nucleus, though it is much less powerful than that of APM 08279+5255. Although a better measurement is needed for NCv1.143, this could be consistent with a buried nuclear starburst or AGN as speculated in Sect. 6.6 should the compact obscured nuclei be unequivocally associated with buried AGN. If such a deeply obscured AGN exists in NCv1.143, its influence on the bulk of the ISM is still limited, consistent with most of the diagnostics from other lines presented in this work.</p><p>We also note that the surface luminosity of the HCN-VIB line (converting to J = 3-2 using local line ratios between 4-3 and 3-2) is about 50 L pc 2 . Such a value is about five times stronger than the brightest compact obscured nuclei in the local Universe, such as NGC 4418 (surface brightness of HCN-VIB is about 9.1 L pc 2 , <ref type="bibr">Falstad et al. 2021)</ref>, making APM 08279+5255 the brightest HCN-VIB source ever discovered. Yet, unlike most of the compact obscured nuclei, where there have been no X-ray detections <ref type="bibr">(Falstad et al. 2021</ref>), APM 08279+5255 is rather unique. As argued in <ref type="bibr">Imanishi et al. (2016)</ref>, the HCN-VIB line can be boosted by AGN; thus, the unusual brightness of the HCN-VIB in APM 08279+5255 is likely powered by the central AGN. In APM 08279+5255, we have detected the CN(4-3) emission line, confirming the first detection reported by <ref type="bibr">Gu&#233;lin et al. (2007)</ref> with a significantly better S/N. While in NCv1.143, we have detected both the 3-2 and 4-3 transitions of the CN line. CN can be a dense gas tracer with a few factors lower critical density than HCN <ref type="bibr">(Aalto et al. 2002)</ref>. In PDRs, CN is primarily formed in the ionization fronts where HCN is dissociated. CN radical can also be formed from CH and N via neutral-neutral reactions <ref type="bibr">(Tielens 2013)</ref>. On the other hand, in hot-temperature environments, CN can also form HCN directly by interacting with H 2 <ref type="bibr">(Harada et al. 2010)</ref>. Comparing APM 08279+5255 and NCv1.143, we find that the luminosity ratio between CN and HCN is significantly lower in APM 08279+5255. Comparing directly the abundance ratios (Figs. <ref type="figure">6</ref> and <ref type="figure">7</ref>), we do see the same trend of a smaller ratio of CN/HCN in APM 08279+5255 than in NCv1.143. Such a deficiency of CN with regard to HCN in the quasar APM 08279+5255 indicates that rather than the ionization process, hot-temperature chemistry powered by the AGN might dominate the CN formation/destruction <ref type="bibr">(Harada et al. 2013)</ref> in APM 08279+5255.</p><p>Nitric oxide NO lines have been detected in APM 08279+5255, the first high-redshift detection of this molecule. NO can form from the interaction of N + OH and NH + O, can be dissociated to N + and NO + , and can also form CN by interacting with C; it is thus an important part of the network of nitrogenbearing species (e.g., <ref type="bibr">Neufeld &amp; Dalgarno 1989)</ref>. NO can also trace dense gas as its critical densities can reach above 10 5 cm 3 . The derived column density of NO in APM 08279+5255 is higher than the values found in local starburst galaxies such as M 82 <ref type="bibr">(Aladro et al. 2011) and</ref><ref type="bibr">NGC 253 (Mart&#237;n et al. 2021)</ref>, which can indicate a high abundance of nitrogen and oxygen. Future detailed analysis of the nitrogen chemical-reaction network can help us understand the chemistry.</p><p>In APM 08279+5255, we have also detected the 4-3 and 5-4 transitions of the classic dense gas tracer, diazenylium N 2 H + , confirming the first tentative detection of the N 2 H + (5-4) line report by <ref type="bibr">Feruglio et al. (2017)</ref>. Also, we report a tentative detection of the cyclopropenylidene c-C 3 H 2 line at 485.7 GHz for the first time at high redshifts, which needs further confirmation.</p><p>A95, page 24 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref> </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.">Chemical analysis of the dense molecular gas</head><p>The unique richness of observational data for both galaxies presented here makes them ideal systems for measuring the heating and cooling processes as well as determining what powers the energy of their ISM via chemical modeling. Using all available lines simultaneously to perform such modeling, however, is an unprecedented and rather challenging task that deserves its own separate and detailed study.</p><p>For the purposes of the present work, we focus on the column densities of four species (HCN, HCO + , HNC, and CS), which are dense gas tracers and thus can tell much about the conditions prevailing in the molecular gas of both galaxies. In particular, the contribution from the stellar far-ultraviolet (FUV) photons can be neglected since the FUV radiation will be severely extinguished in the dense regions with volume densities predicted by the LVG models (Table <ref type="table">7</ref>). For instance, a density of n H = 10 5 cm 3 is likely to have an e&#8629;ective visual extinction of A V ' 30 mag <ref type="bibr">(Bisbas et al. 2023)</ref>, and such visual extinction will extinguish the e&#8629;ect of the FUV field even as strong as 10 5 0 5 , which is at least one order of magnitude higher than the typical value found in dusty high-redshift starburst galaxies (e.g., <ref type="bibr">Ca&#241;ameras et al. 2018;</ref><ref type="bibr">Rybak et al. 2019)</ref>. At such high column densities, the chemistry is no longer driven by FUV radiation but rather by CR, which can be quantified by the CR ionization per H-nuclei ratio (&#8675; CR /n H ) that describes the ionization degree. We therefore focus only on &#8675; CR /n H hereafter, which plays an important role in triggering chemical networks at high column densities (e.g., <ref type="bibr">Bialy &amp; Sternberg 2015)</ref>.</p><p>For the purposes of this chemical modeling, we use the 3D-PDR 6 code, which is an astrochemical code treating photodissociation regions <ref type="bibr">(Bisbas et al. 2012)</ref>. Using various heating and cooling functions and the LVG approximation <ref type="bibr">(Sobolev 1960;</ref><ref type="bibr">Poelman &amp; Spaans 2005)</ref>, the code performs iterations over thermal balance and terminates once the total heating is approximately equal to the total cooling. In this work, the full UMIST2012 <ref type="bibr">(McElroy et al. 2013</ref>) chemical network is used, consisting of 215 species and approximately 3000 reactions. The initial abundances (normalized to total hydrogen) adopted here are [Mg] = 3.981&#8677;10 5 , [C + ] = 10 4 , [S + ] = 3.236&#8677;10 5 , [N] = 6.76&#8677;10 5 , [O] = 3&#8677;10 4 [He] = 0.1. A metallicity of Z = 1 Z (e.g., <ref type="bibr">Dunne et al. 2022</ref>) and a microturbulent velocity of v turb = 1 km s 1 are further assumed.</p><p>In addition, we adopted the following expression of optical depths, which best describes macroturbulent molecular clouds <ref type="bibr">(Papadopoulos &amp; Seaquist 1999)</ref>:</p><p>where dV dr</p><p>(5)</p><p>In the above equations, A i j is the Einstein coe cient of levels i and j, &#9003; i j is the corresponding line frequency, n i and n j the level populations, and g i , g j their statistical weights. The parameter &#8629; depends on the density profile <ref type="bibr">(Papadopoulos &amp; Seaquist 1999)</ref>.</p><p>Here, we have considered 0.65 p &#8629; = 1 (see also <ref type="bibr">Bisbas et al. 2015)</ref>. Equation ( <ref type="formula">4</ref>) is used based on the assumption that in macroturbulent clouds, the optical depth is considered as a local 5 0 is the FUV field normalized to the <ref type="bibr">Draine (1978)</ref> field, and it equals to about 1.7G 0 , where G 0 is the <ref type="bibr">Habing (1968)</ref> field. 6 <ref type="url">https://uclchem.github.io/3dpdr/</ref> 10 -21 10 -20 10 -19 10 -18 10 -17 10 -16 &#950; CR /n H [s -1 cm 3 ] property rather than building along the line-of-sight as treated for local clouds.</p><p>Absolute column densities strongly rely on the assumptions made on the size of the emitting source, which also introduces uncertainty on the opacity of the emission. In order to minimize this uncertainty and the matching to models, we base our analysis on the normalized column density. In this case, we normalize it to the column density of CS as a reference, which will be less a&#8629;ected by optical thickness than, for example, CO. Here, we assume that the spatial distribution among HCN, HCO + , HNC, and CS is similar; however, due to the limit of our current data, this is not certain. Figure <ref type="figure">14</ref> shows the results of our chemical modeling in which we plot for both sources the ratio R = R N,sim /R N,obs versus &#8675; CR /n H , where R is the ratio between the modeled column densities ratios and the observed ones from Table <ref type="table">7</ref>. We adopt two uncertainties for this comparison, a 10% (dark color) and a 50% (light color) of the mean reported in this table, for the purpose of demonstrating how the measurement uncertainties impact our analysis. However, we acknowledge that our estimations of CR ionization rates have large uncertainties.</p><p>A95, page 25 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref>  Notes. The &#8675; CR value of the third column was calculated using the n H density of CS from the LVG results shown in Table <ref type="table">7</ref>.</p><p>Tables 10 present the modeled results for NCv1.143 and APM 08279+5255, respectively. It appears that for both cases, no single solution for the column densities considered is found. Using the n H number density of CS from Table <ref type="table">7</ref> it can be seen that the estimated range of CR ionization rates of &#8675; CR &#8672; (4 40) &#8677; 10 14 s 1 for APM 08279+5255 (although the high &#8675; CR /n H solution of the HCN/CS ratio suggests a higher value of &#8675; CR &#8672; 10 12 s 1 ), and of &#8675; CR ' (8 12) &#8677; 10 13 s 1 for the NCv1.143 galaxy. In both galaxies, the HNC/CS ratio shows systematically lower values of &#8675; CR , while the results from the HCN/CS and HCO + /CS ratios generally agree with each other.</p><p>Similar high &#8675; CR values, as those found here, have been previously reported in systems from the Galactic Center to highredshift galaxies -Bremsstrahlung radiation <ref type="bibr">(Yusef-Zadeh et al. 2013</ref>) and H + 3 observations <ref type="bibr">(Goto et al. 2014;</ref><ref type="bibr">Le Petit et al. 2016)</ref> in the Galactic Center suggest a CR ionization rate &#8675; CR ' (1 100) &#8677; 10 15 s 1 , which is 2-4 orders of magnitude higher than the Milky Way average. The nearby and well-studied NGC 253 starburst is suggested to have a &#8675; CR &amp; 10 14 s 1 derived from the observed HCO + /HOC + emission ratio <ref type="bibr">(Harada et al. 2021)</ref>. Similarly, <ref type="bibr">Holdship et al. (2021)</ref> report an ionization rate &#8675; CR &#8672; 10 11 s 1 derived from chemical models of C 2 H. However, in a subsequent paper and using H 3 O + and SO observations, <ref type="bibr">Holdship et al. (2022)</ref> suggest a lower value of &#8675; CR ' (1 80) &#8677; 10 14 s 1 for NGC 253. Very high &#8675; CR values have also been derived for other star-forming galaxies. OH + , H 2 O + and H 3 O + observations in Arp 220 find a &#8675; CR /n H ' (1 2) &#8677; 10 17 cm 3 s 1 , which leads to a &#8675; CR &amp; 10 13 s 1 for an estimated n H &#8672; 10 4 cm 3 (Gonz&#225;lez-Alfonso et al. 2013). Similarly, the aforementioned lines observed for Mrk 231 also suggest a &#8675; CR /n H ' (1 2) &#8677; 10 16 cm 3 s 1 for the outflowing component implying a &#8675; CR &#8672; (0.5 2) &#8677; 10 12 s 1 (Gonz&#225;lez-Alfonso et al. 2018). <ref type="bibr">Imanishi et al. (2018)</ref> studied OH + and H 2 O + lines of the extended halos of z &#8672; 2.3 galaxies and derived a &#8675; CR &#8672; (1 100) &#8677; 10 16 s 1 , where the ionization rates in the compact star-forming regions are expected to be orders of magnitude higher <ref type="bibr">(Indriolo et al. 2018)</ref>. <ref type="bibr">Muller et al. (2016)</ref> also found higher than Milky Way CR ionization rate in the z = 0.89 molecular absorbers toward PKS1830-211. All these results suggest that the dense molecular gas in these high-redshift star-forming galaxies is subjected to high CR ionization rates. As pointed out by <ref type="bibr">Krumholz et al. (2023)</ref>, assuming star formation is the dominant source of CR, &#8675; CR scales with the gas depletion time. Therefore, such high &#8675; CR values of &#8672;10 14 10 12 s 1 indicates a very short gas depletion timescale of possible only a few to a few tens of megayears, taking the prescription from <ref type="bibr">Krumholz et al. (2023)</ref>, consistent with their intense starburst nature.</p><p>Taking the derived CR ionization rate values in Table 10 for both galaxies, in Fig. <ref type="figure">15</ref>, we show the variation of the abundances in HCN, HCO + , HNC, and CS with gas density.</p><p>10 3 10 4 10 5 10 6 10 7 10 -14 10 -12 10 -10 10 -8 10 -6 &#950;CR 10 -12 s -1 10 -13 s -1 HCO + HCN HNC CS 10 3 10 4 10 5 10 6 10 7 n H2 [cm -3 ] 10 -14 10 -12 10 -10 10 -8 10 -6</p><p>Abundance Fig. <ref type="figure">15</ref>. Abundances of HCN, HCO + , HNC and CS versus n H 2 , for two di&#8629;erent CR ionization rates (solid lines for &#8675; CR = 10 13 s 1 and solid-dotted lines for 10 12 s 1 ). Our model shows that with such a high ionization rate &#8675; CR = 10 13 -10 12 s 1 , the abundances of HCO + is expected to be lower than HCN, HNC, and CS in the dense gas regions of n H 2 &gt; 10 5 cm 3 . However, with increasing CR ionization rates, at the same H 2 densities, the abundance of HCO + is rising for the dense gas while the abundance of CS is decreasing.</p><p>For APM 08279+5255, where the gas densities reach above n H 2 &#8672; 10 5 cm 3 and &#8675; CR ' 10 13 s 1 , we found that our chemical model predicts a low HCO + abundance compared to other species, lower by about two orders of magnitude. This is strikingly consistent with the LVG-derived column densities, as shown in Fig. <ref type="figure">12</ref>, that the abundance of HCO + is about two orders of magnitude lower than that of HCN, HNC, and CS. For NCv1.143, if we assume a &#8675; CR ' 10 12 s 1 , we see a significant increase in the relative abundance of the HCO + (a detailed discussion of the chemistry of HCO + is given in Appendix E), and a small decrease in the CS abundance while HCN and HNC remain similar values of abundances. For NCv1.143, both a higher gas density and likely a higher &#8675; CR lead to similar relative abundances among the dense gas tracers, consistent with Fig. <ref type="figure">12</ref>. It is also worth noticing that, given such a CR ionization rate, the relative abundance of HCO + drops toward the denser conditions from n H 2 &#8672; 10 5 cm 3 , while CS abundance increases with increasing gas densities. Around the gas densities of n H 2 &#8672; 10 5 6 cm 3 , the abundance ratio of HCO + /CS is most sensitive to the change of the CR ionization among the four species, with the HCO + abundance rising and that of CS decreasing as &#8675; CR increases. We note that the discussions above assume that volumetric heating at high column densities arises from the presence of CRs only, neglecting other heating sources that may also contribute to gas heating. For instance, strong X-ray sources can equally contribute to the CR heating and also a&#8629;ect the chemistry in a similar way (e.g., <ref type="bibr">Meijerink et al. 2007;</ref><ref type="bibr">Gallerani et al. 2014)</ref>, though they are alternated much more quickly than CRs and /R 2 . Should such heating sources be accounted for, they will reduce the values of CR ionization rates we find. We therefore note that the &#8675; CR values presented above shall be considered as upper limits.</p><p>Nevertheless, regardless of whether the heating is caused by CRs only or with contributions from X-rays and shocks, the initial conditions of star formation will be altered under such ISM conditions, causing a boosted Jean mass and a top-heavy stellar A95, page 26 of 39 IMF <ref type="bibr">(Papadopoulos 2010;</ref><ref type="bibr">Papadopoulos et al. 2011)</ref>. As predicted by hydrodynamical simulations, such high-temperature gas of &#8672;100 K and H 2 density of &amp;10 5 will lead to a stellar IMF peaking at &amp;15 M <ref type="bibr">(Klessen et al. 2007)</ref>. Moreover, such a topheavy stellar IMF is consistent with the observed CO isotopolog ratios in both galaxies, which have been interpreted as a result of enrichment by massive stars (Sect. 6.9). A similar scenario is presented in the lensed starburst galaxy SMM J2135-0102, where strong gas heating (likely by CR) leads to an enhanced C 18 O abundance <ref type="bibr">(Danielson et al. 2013)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.">Impact of the lensing on the analysis</head><p>Given that our observations are based on globally integrated values using unresolved interferometric data, we do not have information on how each line emission is distributed spatially. In both sources, the background galaxy is strongly lensed, while the foreground galaxies are not visible at longer wavelengths and thus do not contaminate our observations. The lensing can bring potential di&#8629;erential lensing e&#8629;ects, where the magnification factor can be di&#8629;erent for emissions coming from different parts of the lensed galaxies (e.g., <ref type="bibr">Riechers et al. 2011b;</ref><ref type="bibr">Serjeant 2012;</ref><ref type="bibr">Hezaveh et al. 2012;</ref><ref type="bibr">Fu et al. 2012;</ref><ref type="bibr">Yang et al. 2019;</ref><ref type="bibr">Dye et al. 2022)</ref>. This can bring more uncertainties to our analysis because we assume minimum di&#8629;erential lensing across all the molecular lines, which is, of course, a first-order approximation, and yet the only assumption we can make until highangular-resolution imaging of individual lines is obtained.</p><p>For NCv1.143, to better understand how lensing magnification impacts our results, we built the lens model based on 0.3 00 resolution data of the CO and H 2 O, as described in Appendix C. We find a median lensing magnification of about 12 for the dust continuum and about 8-10 for the CO(10-9), H 2 O(2 11 2 02 ) and H 2 O(3 21 3 12 ) emission. Because the line profiles are not strongly distorted by the magnification, and the resolved line profiles of mid/high-J CO and H 2 O(2 11 2 02 ) and H 2 O(3 21 3 12 ) are similar, we can expect that the di&#8629;erential lensing is negligible among the dense gas tracers, at least. This is further supported by the fact that almost all the line profiles from our line survey are similar, except for the 380 GHz H 2 O maser line. However, we caution that some of the di&#8629;use gas tracers in NCv1.143 can have a significantly smaller magnification factor, likely leading to an underestimation of the intrinsic fluxes.</p><p>For APM 08279+5255, we do not expect significant di&#8629;erential lensing. As noted by <ref type="bibr">Riechers et al. (2009)</ref>, even under the most extreme scenarios, the magnification fluctuates mildly, from .5 with small variations for a source radius up to 3 kpc, down to 3 if the source extends further past 10 kpc. Given that such an extensive expansion is highly improbable for the molecular emissions observed, substantial di&#8629;erential lensing in APM 08279+5255 is unlikely.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="9.">Conclusions</head><p>Using NOEMA, we conducted deep 3 mm spectral line surveys toward a dusty quasar, APM 08279+5255 at z = 3.911, and a dusty star-forming galaxy, NCv1.143 at z = 3.565, with total a bandwidth coverage of about 200 GHz in the rest frame, from around 330 to 550 GHz. The line survey data allow us to study the high-redshift ISM with an unparalleled level of detail. Our main findings are:</p><p>-Utilizing MADCUBA <ref type="bibr">(Mart&#237;n et al. 2019a)</ref> plus a matchedfiltering method, we detect 38 emission lines in APM 08279+5255 and 25 emission lines in NCv1.143, from [C I], CO, 13 CO, C 18 O, CN, CCH, HCN, HCO + , HNC, CS, C 34 S, H 2 O, H 3 O + , NO, N 2 H + , CH, and c-C 3 H 2 , as well as the rotational levels of the vibrationally excited HCN (HCN-VIB). The CH, CCH, c-C 3 H 2 , N 2 H + , HCN-VIB, and H 3 O + lines are the first-ever individual high-redshift detections of any transitions of the species. The luminosities of the lines between the two sources behave di&#8629;erently: the SLEDs of most of the tracers are more elevated in APM 08279+5255, indicating more extreme excitation conditions. The line luminosities are higher in APM 08279+5255, except for the [C I](1-0) line. The most significant di&#8629;erence is seen in 448 GHz H 2 O line, where APM 08279+5255 is about nine times brighter than NCv1.143 in flux. -Under the LTE assumption, we derived the relative abundances of the molecules for both sources. By comparing them with some prototype local galaxies, we find that NCv1.143 is more similar to that of the CMZ of the starburstdominated galaxy, NGC 253, while APM 08279+5255 behaves similarly to some local galaxies where the ISM is expected to be dominated by AGN, such as the central &#8672;2 kpc regions of NGC 1068 and NGC 4418. We have also found that the abundances of dense gas tracers are more enhanced in the AGN-dominated sources. Additionally, we find a lower CN/HCN ratio in APM 08279+5255 than in NCv1.143, suggesting that the AGN-powered hottemperature chemistry that converts CN into HCN, is important in APM 08279+5255. -We performed non-LTE LVG modeling of HCN, HCO + , HNC, CS, and C 34 S, which are trace much denser gas than CO: in the range n H 2 &#8672; 10 5 -10 7 cm 3 . The kinetic temperatures derived from all the species are consistent with T kin &#8672; 50-130 K. Interestingly, the LVG-derived column densities are consistent with the LTE-derived values, and we highlight a generally low abundance of HCO + compared with other dense gas tracers. -In APM 08279+5255, we detect the 380 GHz H 2 O maser lines, which contain high-velocity components that are likely linked to the maser spots located on the fast-rotating accretion disk around the central SMBH. This 380 GHz feature is the only identified maser line in APM 08279+5255 from the whole rest-frame frequency of &#8672;330-550 GHz. The flux of this line is at least three times stronger than the undetected 22 GHz, making it a very promising submillimeter H 2 O megamaser candidate in high-redshift galaxies. Simply scaling from local galaxies, we crudely derived the SMBH mass, which is about 10 10 M , consistent with previous literature values. -After including the two water emission lines detected here for the first time, we built a H 2 O excitation model using multiple transitions of H 2 O and the dust continuum. We find the H 2 O excitation conditions in both sources are best explained by two components, the more extended of which are about 1.3 and 0.9 kpc in APM 08279+5255 and NCv1.143, respectively, and both have a dust temperature of &#8672;50 K. The compact component of APM 08279+5255 (R &#8672; 320 pc) has a high dust temperature of about 211 K that dominates the total infrared luminosity output, and that of NCv1.143 (R &#8672; 170 pc) has a dust temperature of about 98 K with a minor contribution to the infrared luminosity. Such a di&#8629;erence in their compact component shows that APM 08279+5255 has a highly prominent compact core that exhibits extreme conditions and dominates the total power output at the far infrared, indicating that the AGN in A95, page 27 of 39 Yang, C., et al.: A&amp;A 680, A95 (2023)</p><p>APM 08279+5255 is in the "turn-on" phase, in contrast with NCv1.143. This showcases the power of H 2 O lines as a probe of ISM structures in dusty galaxies. -While the line flux ratios among HCN, HCO + , and CS are inclusive of the imprint of the XDRs versus the PDRs, the abundance ratios from the LVG analysis suggest that the AGN plays an important role in regulating the abundance of these dense gas species in APM 08279+5255. This is further supported by the abundance ratios between H 3 O + (detected in both APM 08279+5255 and NCv1.143, the first highredshift detections) and HCO + , where we find that XDRs play an important role. -We have also detected the isotopologs of CO ( 13 CO and C 18 O) in both sources. We find similar flux ratios of 13 CO/C 18 O and 12 CO/ 13 CO, as in other starburst galaxies. These ratios are interpreted as evidence for a top-heavy stellar IMF as proposed by <ref type="bibr">Zhang et al. (2018)</ref>, which can significantly impact estimations of the SFRs. -In APM 08279+5255, we have detected the HCN-VIB lines (rotational transition from J up = 4 to 6) at high redshifts for the first time. These lines probe deep into the compact obscured nucleus of the quasar. In NCv.1.143, the upper limit of the HCN-VIB line does not rule out the possibility of a deeply buried AGN. Our calculation of the HCN-VIB surface brightness makes APM 08279+5255 the brightest HCN-VIB emitter discovered to date. -Using a three-dimensional PDR model, we explored the properties of the ISM and the radiation fields by taking the chemistry into account. Using the LVG-derived abundance ratios, we find that both our sources are extremely dustobscured and that FUV radiation plays a limited role because of the high A V . However, we do find high ionization rates in both sources at a level of 10 13 to 10 12 s 1 , which is likely caused by high densities of CRs, although we do not rule out the possibility of contributions from X-rays. Such an extreme condition is likely altering the initial conditions of star formation, leading to a top-heavy stellar IMF, consistent with the enhanced C 18 O/ 13 CO ratio observed. Additionally, our chemical model predicts a low abundance of HCO + compared to HCN, HNC, and CS in such high-density and high-CR-ionization conditions. This provides a possible explanation of the relatively low abundance of HCO + derived from our LVG modeling. -We built detailed models taking chemistry and radiative transfer into account. However, we caution that our line fluxes are derived from spatially unresolved integrated values. In reality, the spatial distribution of each molecular emission can vary significantly across a single galaxy, depending on the ISM conditions in di&#8629;erent regions. This has been observed in the pure-starburst prototype galaxy NGC 253 <ref type="bibr">(Walter et al. 2017;</ref><ref type="bibr">Mart&#237;n et al. 2021)</ref>, where the CMZ has a very distinct chemical process and thus di&#8629;erent spatial distributions of molecular emission than its galactic disk. The variation is even more pronounced when a central AGN is present, as shown in the case study of NGC 1068 <ref type="bibr">(Garc&#237;a-Burillo et al. 2014)</ref>. In our line survey data, the intrinsic variations found in NGC 253 and NGC 1068 add more uncertainties and lead to di culties when interpreting the data, although one can group several tracers according to the typical conditions they trace in common and assume that their emission distributions are coincident. Nevertheless, high-resolution imaging of the individual line emission is needed for a more comprehensive picture of the ISM in APM 08279+5255 and NCv1.143.</p><p>With the drastic improvement of the bandwidths and sensitivities of (sub)millimeter interferometers, at high redshifts, we can now detect not only CO, the traditional low-density gas tracer, but also the emission of a score of high-excitation and more complex molecules, including some rare isotopologs. With the richness of lines detected from these molecules, we are able to understand the physical conditions, structures, and chemical processes of the ISM at high redshifts in details never before achieved. Future high-angular-resolution line survey data will help us further break the degeneracies in the models of gas excitation and ISM chemistry.  1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NHCO+ /dv [ cm -2 km s -1 ]) log10(NHCO+ /dv [ cm-2 km s-1 ]) = 12.52 +0. 7 5 -0. 6 3 APM08279 + 5255, HCO + log10(nH2 [cm -3 ]) = 6.22 +0.61 -0.81 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) log10(Tkin [K]) = 2.06 +0.38 -0.41 4 5 6 7 8 log10(nH 2 [cm -3 ]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NHNC/dv [ cm -2 km s -1 ]) 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NHNC/dv [ cm -2 km s -1 ]) log10(NHNC/dv [ cm-2 km s-1 ]) = 14.38 +0.65 -0.83 APM08279 + 5255, HNC log10(nH2 [cm -3 ]) = 5.59 +1.12 -1.23 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) log10(Tkin [K]) = 1.97 +0.48 -0.57 4 5 6 7 8 log10(nH 2 [cm -3 ]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NHNC/dv [ cm -2 km s -1 ]) 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NHNC/dv [ cm -2 km s -1 ]) log10(NHNC/dv [ cm-2 km s-1 ]) = 13.75 +0.92 -1.25 NCv1.143, HNC log10(nH2 [cm -3 ]) = 5.59 +1.12 -1.23 log10(nH2 [cm -3 ]) = 6.22 +0.61 -0.81 Fig. B.1. Posterior probability distributions of molecular gas density (n H 2 ), gas temperature (T kin ) and column density per velocity (N mol/d v) of each species in APM 08279+5255 and NCv1.143, with the maximum posterior possibility point in the parameter space shown in orange lines and points. The contours are in steps of 0.5 starting from the center. A95, page 33 of 39 Yang, C., et al.: A&amp;A 680, A95 (2023) log10(nH2 [cm -3 ]) = 6.28 +0.62 -0.92 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) log10(Tkin [K]) = 1.96 +0.30 -0.30 4 5 6 7 8 log10(nH 2 [cm -3 ]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NCS/dv [ cm -2 km s -1 ]) 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NCS/dv [ cm -2 km s -1 ]) log10(NCS/dv [ cm-2 km s-1 ]) = 15.48 +0.54 -0.91 APM08279 + 5255, CS log10(nH2 [cm -3 ]) = 5.57 +1.21 -1.40 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K]) log10(Tkin [K]) = 1.82 +0.54 -0.45 4 5 6 7 8 log10(nH 2 [cm -3 ]) 1 1 1 2 1 3 1 4 1 5 1 6 log10(NCS/dv [ cm -2 km s -1 ]) 1 . 2 1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K])</p><p>1 1 1 2 1 3 1 4 1 5 1 6 log10(NCS/dv [ cm -2 km s -1 ]) log10(NCS/dv [ cm-2 km s-1 ]) = 13.96 +1.62   -1.70   NCv1.143, CS log10(nH2 [cm -3 ]) = 5.43 +1.17  <ref type="bibr">(Bisbas et al. 2019)</ref>. The figure shows the optical depth of 13 CO(4-3) and C 18 O(4-3) lines as a function of the H 2 volume density. We find that both lines remain optically thin for n H 2 . 10 6 cm 3 ), while the 13 CO(4-3) starts to have moderate optical depth with increasing H 2 densities.</p><p>We performed a PDR calculation to explore how the optical depth of 13 CO(4-3) and C 18 O(4-3) builds along with the cloud depth. We constructed a density distribution resulting from the A V, e&#8629; n H relation presented in <ref type="bibr">Bisbas et al. (2019)</ref> and <ref type="bibr">Bisbas et al. (2023)</ref>. This empirical relation connects the local visual extinction with the most probable local number density. The calculation was performed using an FUV intensity of / 0 = 10 (normalized to the spectral shape of Draine 1978), a CR ionization rate of &#8675; CR = 10 13 s 1 (as derived from Sect. 7), and a metallicity of 1 Z . The microturbulent velocity controlling the turbulent heating was taken to be v turb = 10 km s 1 , and the velocity dispersion was taken to be v disp = 180 km s 1 to be in accordance to the observed linewidth. Furthermore, we assumed a 12 C/ 13 C isotope ratio of 30 and 12 CO/C 18 O of 200 (e.g., <ref type="bibr">Mart&#237;n et al. 2019b;</ref><ref type="bibr">Tang et al. 2019</ref>). Figure <ref type="figure">D</ref>.1 shows the optical depths of the 13 CO(4-3) and C 18 O(4-3) lines as a function of the H 2 density, n H 2 . For values of n H 2 . 10 6 cm 3 , both lines remain optically thin. However, when n H 2 reach beyond 10 6 cm 3 , the 13 CO(4-3) line starts to have a moderate optical depth while C 18 O(4-3) remains optical thin until the density getting close to 10 7 cm 3 . Both lines start to get optically thick if n H 2 &amp; 10 7 cm 3 . In the conditions of the n H 2 between 10 6 and 10 7 cm 3 , the optical depth of the 13 CO(4-3) will reach about 10. Such an optical depth will lead to a low flux ratio of 13 CO/C 18 O close to unity and a very low flux ratio of 12 CO/ 13 CO, as pointed out by <ref type="bibr">Zhang et al. (2018)</ref>. However, the observed 12 CO/ 13 CO ratios in both our sources (Table <ref type="table">9</ref>) are about 20-30, inconsistent with a optically thick scenario of the 13 CO.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix E: Detailed chemical modeling of HCO +</head><p>The left panel of Fig. <ref type="figure">E</ref>.1 displays the HCO + abundance versus the local number density, n H , for five di&#8629;erent CR ionization rates (&#8675; CR = 10 16 10 12 s 1 ). The FUV radiation is neglected in these models, as mentioned in the main text, and the macroturbulent optical depth expression (Eq. 4) is adopted. Overall, the abundance of HCO + peaks at densities in the range of n H ' 10 4 to a few 10 5 cm 3 , with the e&#8629;ect to be better seen when &#8675; CR &amp; 10 13 s 1 . In the low end of the above &#8675; CR values, HCO + is formed mainly via the reactions H 2 + HOC + ! HCO + + H 2 (R1)</p><p>R1 and R2 together form approximately 80% of the total HCO + abundance, with R2 becoming more e&#8629;ective for densities n H . 10 2 cm 3 . For n H &amp; 10 3 cm 3 , the reaction</p><p>dominates the formation route of HCO + . For very high &#8675; CR values, HCO + abundance builds rapidly when n H &amp; a few 10 3 cm 3 , below which is in practice negligible (Fig. <ref type="figure">E</ref>.1). Contrary to the aforementioned case, R2 remains, here, the main reaction that is able to form more than 50% of the total HCO + abundance. In all cases, HCO + is destroyed with an e ciency of almost 100% due to its reaction with free electrons, leading to the formation of CO and H. The right panel of Fig. <ref type="figure">E</ref>.1 shows the temperature profile of HCO + . The temperature profile varies as a function of the CR ionization rate since it inserts heating. We performed various runs with di&#8629;erent CR ionization rates, and we have overplotted iso-(&#8675;/n) lines, the range of which corresponds to the solutions we found for the two galaxies. Assuming the typical density for the dense gas, we find that their gas at high column densities is relatively warm (&#8672; 50-100 K), consistent with the LVG-derived gas temperatures.</p><p>For low densities, an interesting behavior occurs in which the gas temperature decreases as the CR ionization ray increases. This is counter-intuitive, given that CRs heat up the gas. The decrease in gas temperature occurs because the production of C + abundance increases, making the emission line of [C II] increase. The latter is a strong coolant, which in turn decreases the overall gas temperature at low densities <ref type="bibr">(Bisbas et al. 2017</ref>).</p><p>A95, page 38 of 39 <ref type="bibr">Yang, C., et al.: A&amp;A 680, A95 (2023)</ref>  A95, page 39 of 39</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_0"><p>MADCUBA VERSION 6.0 (07/05/2018), https://www.cab. inta-csic.es/madcuba/index.html</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_1"><p>Ratios around 3.3 are derived with HCN(4-3)/CS(8-7) and HCN (6-5)/CS(8-7) toward APM 08279+5255.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_2"><p>.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_3"><p>1 . 6 2 . 0 2 . 4 2 . 8 log10(Tkin [K])</p></note>
		</body>
		</text>
</TEI>
