<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.3</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>107</ContextCount>
  <ElementCount>53</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>52</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="d861414dncsr.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>995470 - Disclosure - N-2</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cef/role/N2</Role>
      <ShortName>N-2</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="N-CSR" isDefinitelyNotFs="true" isNcsr="true" isUsgaap="true" original="d861414dncsr.htm">d861414dncsr.htm</File>
    <File>nmyqmif-20251106.xsd</File>
  </InputFiles>
  <SupplementalFiles>
    <File>g861414g1dsp1a.jpg</File>
    <File>g861414g1g01t01.jpg</File>
    <File>g861414g1g01t02.jpg</File>
    <File>g861414g1g17t01.jpg</File>
    <File>g861414g1g17t02.jpg</File>
    <File>g861414g1g19t01.jpg</File>
    <File>g861414g1g19t02.jpg</File>
    <File>g861414g1g21t01.jpg</File>
    <File>g861414g1g21t02.jpg</File>
    <File>g861414g1g23t01.jpg</File>
    <File>g861414g1g23t02.jpg</File>
    <File>g861414g1g25t01.jpg</File>
    <File>g861414g1g25t02.jpg</File>
    <File>g861414g1g27t01.jpg</File>
    <File>g861414g1g27t02.jpg</File>
    <File>g861414g1g29t01.jpg</File>
    <File>g861414g1g29t02.jpg</File>
    <File>g861414g1g31t01.jpg</File>
    <File>g861414g1g31t02.jpg</File>
    <File>g861414g1g33t01.jpg</File>
    <File>g861414g1g33t02.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="14">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="206">http://xbrl.sec.gov/cef/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
