#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e17;
mt19937 random1(136786931);
long long randlr(long long l, long long r) {
  return random1() % (r - l + 1) + l;
}
const long double PI = 3.1415926535897932384626433832795028841971;
struct Point {
  long long first, second;
  Point(){};
  Point(long long _x, long long _y) {
    first = _x;
    second = _y;
  }
};
struct Vector {
  long long first, second;
  Vector(){};
  Vector(Point p) {
    first = p.first;
    second = p.second;
  }
  Vector(Point p1, Point p2) {
    first = p2.first - p1.first;
    second = p2.second - p1.second;
  }
  long long operator*(Vector &oth) {
    return first * oth.second - second * oth.first;
  }
};
bool in_ang(Point p, Point a, Point o, Point b) {
  Vector oa(o, a), ob(o, b), op(o, p);
  return (oa * op > 0 && op * ob > 0) || (oa * op < 0 && op * ob < 0);
}
const long double eps = 1e-7;
bool eq(long double first, long double second) {
  return abs(first - second) <= eps;
}
const long long mod = (1e9) + 7;
void solve(long long stx, long long enx, long long m) {
  if (enx == stx) {
    long long d = 0;
    bool lft = 1;
    for (long long i = 0; i < m; i++) {
      long long wh = -1;
      if (lft) {
        wh = 1 + d;
        lft = 0;
      } else {
        wh = m - d;
        d++;
        lft = 1;
      }
      cout << stx << ' ' << wh << "\n";
    }
    return;
  }
  long long d = 0;
  for (long long i = 0; i < m; i++) {
    long long wh = -1;
    long long nwh = -1;
    wh = 1 + d;
    nwh = m - d;
    d++;
    cout << stx << ' ' << wh << "\n";
    cout << enx << ' ' << nwh << "\n";
  }
  if (enx == stx + 1) return;
  solve(stx + 1, enx - 1, m);
}
signed main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  solve(1, n, m);
  return 0;
}
