Question: When do Pam and Pam's spouse on The Office end up together?

Context paragraphs:
paragraph_text: The ``will they or wo n't they ''tension between Jim and Pam is a strong storyline in the early episodes of The Office, encompassing much of Seasons 1 to 3. In the opener of Season 4, the two characters are revealed to be dating, and as such, other character romances, such as the romance between fellow co-workers Dwight Schrute and Angela Martin, begin to move more toward the forefront of episodes. In Season 6, Jim and Pam are married in the season's 4th and 5th episodes (hour long), a feat considered noteworthy by many television critics, as bringing together the two lead love interests in a television series is often thought to be a risky venture. Their child is born in the second half of the season, during another hour long,`` The Delivery''. Pam and Jim's second child is born during season 8. In season 9, their marriage becomes strained when Jim takes up a second job in Philadelphia. They ultimately decide to leave Dunder Mifflin together so Jim can pursue his dream job.
title: Pam Beesly
paragraph_text: Pam Shriver and Natasha Zvereva were the defending champions but they competed with different partners that year, Shriver with Martina Navratilova and Zvereva with Gigi Fernández.
title: 1992 US Open – Women's Doubles
paragraph_text: Pamela Barnes Ewing is a fictional character from the CBS primetime soap opera, Dallas. Pamela is portrayed by actress Victoria Principal, first appearing on the show in the first episode, entitled ``Digger's Daughter '', which was first broadcast on April 2, 1978. Dallas follows the trials of the wealthy Ewing oil family in the city of Dallas, Texas, which Pam has married into. Principal played Pam until the end of the tenth season of Dallas in 1987, when the character crashes into a truck carrying butane and propane and her body is severely burned. After this, she is briefly played by actress Margaret Michaels in an attempt to write the character out. Pamela's storylines in season 1 focus on her relationship with her new husband, Bobby Ewing (Patrick Duffy), and her fight against the considerable suspicion and hostility from within the Ewing family, due to Pamela being a member of the Barnes family. Pamela's love for Bobby remains a strong character trait throughout her tenure on the show, noted for its similarities to Romeo and Juliet, with two people from hostile families falling in love.
title: Pam Ewing
paragraph_text: Pam participates in an art show, but few people attend. Her co-worker, Oscar, brings his partner along who, not knowing that Pam is standing behind him, criticizes her work by proclaiming that ``real art requires courage. ''Oscar then goes on to say that courage is n't one of Pam's strong points. Affected by this statement, Pam tells the documentary crew that she is going to be more honest, culminating in a dramatic coal walk during the next - to - last episode of the season,`` Beach Games'', and a seemingly sincere speech to Jim in front of the entire office about their relationship. Michael also comes to the art show and reveals his erratically kind heart and loyalty by buying, framing and hanging Pam's drawing of the Dunder Mifflin building in the office. In the season finale, ``The Job, ''she leaves a friendly note in Jim's briefcase and an old memento depicting the 'gold medal' yogurt lid from the Office Olympics, which he sees during an interview for a job at Corporate in New York City. While he is asked how he`` would function here in New York'', Jim is shown to have his mind back in Scranton, still distracted by the thought of Pam. Jim withdraws his name from consideration and drives back to the office, where he interrupts a talking head Pam is doing for the documentary crew by asking her out for dinner. She happily accepts, visibly moved, abandoning a train of thought about how she would be fine if Jim got the job and never came back to Scranton. Karen quits soon after, becoming the regional manager at Dunder Mifflin's Utica branch.
title: Pam Beesly
paragraph_text: "I Said a Prayer" is a song written by Leslie Satcher, and recorded by American country music artist Pam Tillis. It was released in May 1998 as the first single from the album "Every Time". The song reached #12 on the "Billboard" Hot Country Singles & Tracks chart.
title: I Said a Prayer
paragraph_text: ``Licence to Kill ''-- Gladys Knight`` Wedding Party'' -- Ivory ``Dirty Love ''-- Tim Feehan`` Pam'' ``If You Asked Me To ''-- Patti LaBelle`` James & Felix on Their Way to Church'' ``His Funny Valentine ''`` Sanchez Is in the Bahamas / Shark Fishing'' ``Ninja ''`` Licence Revoked''
title: Licence to Kill (soundtrack)
paragraph_text: Pam Faris is a former Democratic member of the Michigan House of Representatives and a former employee with the Genessee Circuit Court system. She is the wife of former Lieutenant Governor John D. Cherry.
title: Pam Faris
paragraph_text: In ``The Merger '', Jim's and Pam's reunion is awkward. Pam is overjoyed, but Jim is clearly uncomfortable. He lets Pam know that he is seeing someone, and gradually Karen is introduced as his girlfriend. As Jim settles back in at Scranton, he uses his promotion as an excuse to avoid his old interactions and pranks with Pam, claiming that pulling pranks is not appropriate for his position. However, in time, Jim does return to his old ways, especially targeting Andy Bernard, a Stamford transfer, and Dwight.
title: Jim Halpert
paragraph_text: Pam Belluck, an American journalist and author, is a health and science writer for "The New York Times" and author of the acclaimed nonfiction book "Island Practice," which is in development for a television series.
title: Pam Belluck
paragraph_text: Jim and Pam marry early in the season, at Niagara Falls, during the highly anticipated, hour long episode, ``Niagara ''. The ending of the episode, in which their co-workers dance down the aisle, is an imitation of a viral YouTube video -- JK Wedding Entrance Dance. Following the wedding, a multi-episode story arc begins in which it is revealed that Michael hooked up with Pam's mother the night of the wedding. The two break up during`` Double Date'', an episode that ends with Pam slapping Michael in response to his actions.
title: Pam Beesly
paragraph_text: "My Whole World Ended (The Moment You Left Me)" is the solo debut single for former Temptations lead singer David Ruffin, released on Motown Records in early 1969 (see 1969 in music). The song was written by Harvey Fuqua, Johnny Bristol, Pam Sawyer, and James Roach, with its melody and intro based upon the classical music piece "Frühlingslied" by Felix Mendelssohn. Fuqua and Bristol handled the recording's production.
title: My Whole World Ended (The Moment You Left Me)
paragraph_text: Melissa Pam Ordway Gaston (born March 31, 1983) is an American actress and model. She has modeled in many campaigns and acted in such films as 17 Again and on television in Privileged. She currently portrays the character of Abby Newman on the drama series The Young and the Restless.
title: Melissa Ordway
paragraph_text: Rwang Pam Stadium is a multi-use stadium in Jos, Nigeria. It is used mostly for football matches and is the home stadium of Jos teams JUTH F.C., Plateau United and Mighty Jets. The stadium has a capacity of 15,000 spectators.
title: Rwang Pam Stadium
paragraph_text: Pam's breastfeeding does not go well, and though a male lactation consultant (Lee Kirk, Jenna Fischer's husband, and at that time Jenna's fiance) is summoned to provide apparently successful coaching, Cecelia still fails to ``latch ''properly. Against the advice of the nurse, Jim and Pam opt to have Cecelia spend the night with them instead of in the nursery, and they are kept up long hours tending to her. A sleep - deprived Pam accidentally nurses a baby that belongs to a new mom (Melissa Rauch) in the same hospital room. As Jim and Pam get ready to leave the hospital, Pam manages to breast feed Cecelia while Jim gets the car (which is littered with parking tickets, thanks to Michael parking the car in an ambulance only zone).
title: The Delivery (The Office)
paragraph_text: Michael Scott (Steve Carell) is frustrated that Take Your Daughter to Work Day will force him to tone down his office antics. Toby Flenderson (Paul Lieberstein) and Stanley Hudson (Leslie David Baker) bring their daughters, Sasha (Delaney Ruth Farrell) and Melissa (Jazz Raycole) respectively, Kevin Malone (Brian Baumgartner) brings his fiancée's daughter, Abby, and Meredith Palmer (Kate Flannery) brings her son, Jake (Spencer Daniels). Pam Beesly (Jenna Fischer) is determined to befriend one child by the end of the day. She tries with Abby, who instead takes a liking to Jim. Pam watches, clearly endeared to Jim's way with kids. Sasha walks into Michael's office and plays with his toys, and after his jokes she is quite fond of him. Melissa develops a crush on Ryan Howard (B.J. Novak) and asks for his number, while Kelly Kapoor (Mindy Kaling) alerts Stanley that Ryan may be up to something. Stanley angrily reprimands a confused Ryan for his ``motives '', which Ryan later described as`` one of the most frightening experiences'' of his life.
title: Take Your Daughter to Work Day (The Office)
paragraph_text: As the day wears on, Michael becomes convinced that what happened to his office is a hate crime and an act of terrorism. Believing it to have been perpetrated by someone in the office, he begins to lose his faith in his employees, whom he considers his friends. Michael tries talking to his former boss Ed Truck (Ken Howard), who tells him that he does not need to have his employees be his friends. But his mood changes drastically when he finds out the prank was carried out by his obnoxious friend Todd Packer (David Koechner). Michael instantly finds the joke hilarious, and his faith in his friends is restored. At the end of the day, Jim is cheered up when he finds that all seven of his voicemail messages were left by Pam throughout the day. Jim is seen driving home, and Pam's voicemails act as a voice - over, closing out the episode.
title: The Carpet
paragraph_text: Season three marks a turning point for Pam's character: she gains self - confidence and appears less passive and more self - assured as the season progresses. In ``Gay Witch Hunt, ''the season's opener, it is revealed that Pam got cold feet before her wedding and did not marry Roy after all, and that Jim transferred to a different Dunder Mifflin branch, in Stamford, shortly after Pam rejected him a second time, after their kiss. Pam moves into her own apartment, begins taking art classes, a pursuit that Roy had previously dismissed as a waste of time, and buys a new car, a blue Toyota Yaris. Jim returns to Scranton later on as a result of`` The Merger'', and brings along a female co-worker, Karen Filippelli, whom he begins dating. Jim and Pam appeared to have ended all communication after Jim transfers to the Stamford branch (aside from an episode in which Jim accidentally calls Pam at the end of the work day), and their episodes together following the branch merge are tense, despite both admitting to still harboring feelings for the other during the presence of the documentary cameras.
title: Pam Beesly
paragraph_text: Pamela Joan "Pam" Boyd-Petroski (born September 27, 1955 in Atlantic City, New Jersey) is an American former handball player who competed in the 1984 Summer Olympics.
title: Pamela Boyd
paragraph_text: In the Season 5 premiere, ``Weight Loss '', Pam begins her three - month course at the Pratt Institute. In this episode, Jim proposes in the pouring rain at a rest stop, saying that he`` ca n't wait''. In ``Business Trip '', Pam learns that she is failing one of her classes and will have to remain in New York another three months to retake it. Although Jim is supportive and tells her he will wait for her to come back`` the right way'', she ultimately makes the decision to return home, saying that she realized she hated graphic design and missed Scranton. A deleted scene for the episode shows Jim looking through Pam's graphic design projects, which he thinks are ``cool '', as well as a notebook filled with pencil sketches, which he finds a lot more impressive than her graphic design projects, implying her talents lie in hand - drawn works. In`` Two Weeks'', Pam agrees to become Michael's first saleswoman in his not - yet - established company, The Michael Scott Paper Co., as a supportive Jim looks on. When David Wallace makes an offer to buy the company Michael negotiates in order to get their jobs at Dunder Mifflin back instead, including adding Pam to the sales team. In ``Company Picnic '', Pam, after dominating the company volleyball tournament, injures her ankle during a game and is taken to the hospital against her wishes. At the hospital, the camera crew is stationed outside an exam room while a doctor updates Jim and Pam on her condition. There is no audio as the camera shows Jim and Pam embrace, looking shocked and ecstatic. It is implied that she is pregnant and is confirmed in the Season 6 premiere,`` Gossip''.
title: Pam Beesly
paragraph_text: World Food Programme World Food Programme WFP Headquarters in Rome Abbreviation WFP, PAM Formation 1961 Type UN Humanitarian Programme Legal status Active Headquarters Rome, Italy Head David Beasley Website www.wfp.org
title: World Food Programme

Reasoning steps:
who is pam married to on the office >>>> Jim
when do Jim and pam end up together >>>> during the highly anticipated, hour long episode, ``Niagara ''

Answer: spans: during the highly anticipated, hour long episode, ``Niagara ''