#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<bool>> visited(n + 1, vector<bool>(m + 1, false));
  int z_fir = 1;
  int z_sec = n;
  int x1 = 1;
  int y1 = 1;
  int x2 = m;
  int y2 = n;
  while (true) {
    if (y1 > y2) break;
    if (visited[y1][x1]) break;
    cout << y1 << " " << x1 << "\n";
    if (visited[y2][x2]) break;
    if (y1 == y2 && x1 == x2) break;
    cout << y2 << " " << x2 << "\n";
    visited[y1][x1] = true;
    visited[y2][x2] = true;
    x1++;
    x2--;
    if (x2 == 0) {
      x2 = m;
      x1 = 1;
      y1 = z_fir + 1;
      z_fir++;
      y2 = z_sec - 1;
      z_sec--;
    }
  }
}
